缺少Homebrew软件包之间的链接

tam*_*tam 6 homebrew boost linker-errors package boost-python

我都boostboost-python安装通过brew我的MacOS 10.12塞拉利昂.但是,boost-python似乎并未认为其依赖项boost已安装:

$ brew info boost
boost: stable 1.68.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.65.1 (12,679 files, 401.2MB)
  Poured from bottle on 2017-10-28 at 09:19:27
/usr/local/Cellar/boost/1.67.0_1 (13,506 files, 447.7MB) *
  Poured from bottle on 2018-05-18 at 03:58:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ?
==> Options
--with-icu4c
    Build regexp engine with icu support
--without-single
    Disable building single-threading variant
--without-static
    Disable building static library variant
--HEAD
    Install HEAD version
==> Caveats
Building of Boost.Log is disabled because it requires newer GCC or Clang.
==> Analytics
install: 51,109 (30 days), 167,563 (90 days), 648,244 (365 days)
install_on_request: 15,663 (30 days), 48,585 (90 days), 191,757 (365 days)
build_error: 0 (30 days)

$ brew info boost-python
boost-python: stable 1.68.0 (bottled), HEAD
C++ library for C++/Python2 interoperability
https://www.boost.org/
/usr/local/Cellar/boost-python/1.65.1 (457 files, 25MB)
  Built from source on 2017-10-28 at 09:23:57 with: --with-python3
/usr/local/Cellar/boost-python/1.67.0 (459 files, 17.3MB) *
  Poured from bottle on 2018-05-18 at 03:58:20
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost-python.rb
==> Dependencies
Required: boost ?
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 5,214 (30 days), 16,979 (90 days), 76,707 (365 days)
install_on_request: 3,865 (30 days), 12,416 (90 days), 56,500 (365 days)
build_error: 0 (30 days)
Run Code Online (Sandbox Code Playgroud)

如何boost-python识别/ link与其依赖关系的存在boost

如果我可以避免卸载和重新安装,那将是很好的,因为有很多其他的包依赖于boost,这让我花了很长时间/很长时间才能开始工作.

我这样做是因为:在编译caffe时,它说ld: library not found for -lboost_python.谢谢.

tam*_*tam 5

这就是我设法认识boost-python到其依赖性的存在的方法booth在不卸载Homebrew 中任何现有的boost软件包的情况下boost-python,我运行了以下行

brew install --build-from-source -vd boost boost-python
Run Code Online (Sandbox Code Playgroud)

这似乎重新安装了这两个软件包并干净地建立了该链接。

为了解决 Caffe 编译问题,此命令libboost_python27*在 中生成 files 文件/usr/local/lib,我刚刚将其复制并重命名为libboost_python*.