Homebrew 包之间缺少 link
Missing link between Homebrew packages
我在 MacOS 10.12 Sierra 上通过 brew
安装了 boost
和 boost-python
。但是,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)
如何让 boost-python
识别 / link 及其依赖项 boost
的存在?
如果我能避免卸载和重新安装就太好了,因为有太多其他依赖于 boost 的包让我花了 long/difficult 时间才开始工作。
我这样做是因为:编译 caffe 时,它说 ld: library not found for -lboost_python
。谢谢。
这就是我设法让 boost-python
识别其依赖项 booth
的存在的方法。 在不卸载 Homebrew 中任何现有的 boost
和 boost-python
软件包的情况下,我 运行 以下行
brew install --build-from-source -vd boost boost-python
这似乎重新安装了两个软件包并清楚地建立了 link。
为了解决 Caffe 编译问题,此命令在 /usr/local/lib
中生成文件 libboost_python27*
个文件,我刚刚将其复制并重命名为 libboost_python*
。
我在 MacOS 10.12 Sierra 上通过 brew
安装了 boost
和 boost-python
。但是,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)
如何让 boost-python
识别 / link 及其依赖项 boost
的存在?
如果我能避免卸载和重新安装就太好了,因为有太多其他依赖于 boost 的包让我花了 long/difficult 时间才开始工作。
我这样做是因为:编译 caffe 时,它说 ld: library not found for -lboost_python
。谢谢。
这就是我设法让 boost-python
识别其依赖项 booth
的存在的方法。 在不卸载 Homebrew 中任何现有的 boost
和 boost-python
软件包的情况下,我 运行 以下行
brew install --build-from-source -vd boost boost-python
这似乎重新安装了两个软件包并清楚地建立了 link。
为了解决 Caffe 编译问题,此命令在 /usr/local/lib
中生成文件 libboost_python27*
个文件,我刚刚将其复制并重命名为 libboost_python*
。