macOS Catalina下安装libx11失败的问题处理




checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for nl_langinfo... yes
checking for X11... no
configure: error: Package requirements (xproto >= 7.0.25 xextproto xtrans xcb >= 1.11.1 kbproto inputproto) were not met:

Package 'pthread-stubs', required by 'xcb', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables X11_CFLAGS
and X11_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!

Error: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from MacHomebrew on Twitter.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

最后这个提示一直让我误以为是系统版本问题,但这是macOS 10的最后一个小版本,不想升到11以上,还是得想别的办法。



看了一下brew list,系统里已经存在了libx11,只是版本低一点而已,于是试图用brew pin libx11锁定版本,但是安装ffmpeg又必须依赖最新版。


env PKG_CONFIG_PATH=`pkg-config --variable pc_path pkg-config`



brew reinstall libxcb