Error: x265: unknown version :lion

Hi, I think my brew is messed up on my mac, i’m not able to install anything i need for a long time. I remember trying to install ocaml few years back and couldn’t but don’t remember the errors, ended up installing manually. Now i’m trying ffmpeg with x265 support.
First error is for x265: Error: x265: unknown version :lion
ffmpeg. fails with another one: Error: yasm: Unsupported special dependency :python

brew doctor gives me something. like this:

Warning: Homebrew/homebrew-core is not on the master branch.

Check out the master branch by running:

git -C "$(brew --repo homebrew/core)" checkout master

Warning: Unbrewed dylibs were found in /usr/local/lib.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:

/usr/local/lib/libwkhtmltox.0.12.3.dylib

/usr/local/lib/libwkhtmltox.0.12.4.dylib

Warning: Unbrewed header files were found in /usr/local/include.

If you didn't put them there on purpose they could cause problems when

building Homebrew formulae, and may need to be deleted.
Warning: You have unlinked kegs in your Cellar.

Leaving kegs unlinked can lead to build-trouble and cause brews that depend on

those kegs to fail to run properly once built. Run `brew link` on these:

ocaml

git

Warning: Some installed formulae are not readable:

protobuf: Unsupported special dependency :python3

Warning: Your Xcode (10.2) is outdated.

Please update to Xcode 10.2.1 (or delete it).

Xcode can be updated from the App Store.

Any clue what’s happening? Thanks.

You’re not on the master branch, it’s telling you what to do to fix it though.

git -C "$(brew --repo homebrew/core)" checkout master

But since it also seems to be very outdated you might want to run

  • brew update-reset - This will reset homebrew to the latest upstream state
  • brew upgrade - This will make sure your software is the latest version and actually supported by homebrew and upstream.

Thank you, i don’t know how it ended up in that state but it works now.
However, I wanted to install x265 so i can “install ffmpeg --with-x265”, and weirdly enough i get another error, although i saw on their brew this is the right argument: Error: invalid option: --with-x265

Do you know what might be wrong here?

Option support for homebrew-core was removed almost a year ago. As far as I remember https://docs.brew.sh/Interesting-Taps-and-Forks has a tap with ffmpeg options though, maybe that will work.