运行
brew doctor
会给我这个:
警告:在 /usr/local/lib 中发现了未经过酿造的 dylibs。如果您没有有意将它们放在那里,则在构建 Homebrew 公式时可能会导致问题,并且可能需要删除。
未预期的 dylibs:
/usr/local/lib/libqmi_api.dylib
/usr/local/lib/libvousb.dylib
有人知道这些 dylibs 是什么吗?
运行
brew doctor
会给我这个:
警告:在 /usr/local/lib 中发现了未经过酿造的 dylibs。如果您没有有意将它们放在那里,则在构建 Homebrew 公式时可能会导致问题,并且可能需要删除。
未预期的 dylibs:
/usr/local/lib/libqmi_api.dylib
/usr/local/lib/libvousb.dylib
有人知道这些 dylibs 是什么吗?
如果您仍然需要这些库,我建议您尝试升级它们。我曾经遇到过与libusb类似的问题,后来通过进行“brew upgrade”解决了该问题。
brew upgrade libqmi_api
brew upgrade libvousb
有时候,brew 无法将库符号链接到 /usr/local 中。这种情况发生在您已经拥有旧版本的库的符号链接时。
brew link --overwrite libusb
应该做这件事。
这是我的测试用例,使用 libusb 库:
$ brew doctor
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/libusb-1.0.0.dylib
$ brew upgrade libusb
==> Upgrading 1 outdated package, with result:
libusb 1.0.9
==> Upgrading libusb
==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2
######################################################################## 100,0%
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.9
==> make install
Warning: Could not link libusb. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link libusb'
Possible conflicting files are:
/usr/local/lib/libusb-1.0.0.dylib
==> Summary
/usr/local/Cellar/libusb/1.0.9: 11 files, 420K, built in 9 seconds
$ brew link --overwrite libusb
Linking /usr/local/Cellar/libusb/1.0.9... 5 symlinks created
$ brew doctor
Your system is ready to brew.
$