【发布时间】:2014-03-14 14:45:56
【问题描述】:
我已经被这个问题困扰了一段时间了。我正在尝试安装图形工具 - http://graph-tool.skewed.de/download#macos - 我有遵循这些步骤的先决条件,图形工具站点链接到:https://gist.github.com/openp2pdesign/8864593
而不是似乎没有给我所有文件的 brew install ,我去了 Boost 的官方网站并按照以下步骤从那里正确下载:http://www.boost.org/doc/libs/1_41_0/more/getting_started/unix-variants.html 它主要是获取一个 tar 文件并解压缩它。
然后我将我的 boost 安装放在这里:
/usr/local/boost_1_55_0
我做了一个小的 C++ 示例并确认 Boost 工作正常(使用来自 http://www.boost.org/doc/libs/1_41_0/more/getting_started/unix-variants.html 的“使用 Boost 构建简单程序”。
现在问题的核心:尝试安装图形工具。在最后一步,我这样做了
./configure PYTHON_EXTRA_LDFLAGS="-L/usr/local/bin"
(PYTHON_EXTRA_LDFLAGS="-L/usr/local/bin" 只是让配置脚本可以找到 Python。)
但是我得到了这个错误。 (它发现 Python 很好,但不是提升!)
...
================
Detecting python
================
checking for a Python interpreter with version >= 2.6... python
checking for python... /Users/daze/Library/Enthought/Canopy_64bit/User/bin/python
checking for python version... 2.7
checking for python platform... darwin
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for python2.7... (cached) /Users/daze/Library/Enthought/Canopy_64bit/User/bin/python
checking for a version of Python >= '2.1.0'... yes
checking for a version of Python == '2.7.3'... yes
checking for the distutils Python package... yes
checking for Python include path... -I/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/include/python2.7
checking for Python library path... -L/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/config -lpython2.7
checking for Python site-packages path... /Users/daze/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
checking python extra libraries... -ldl -framework CoreFoundation
checking python extra linking flags... -L/usr/local/bin
checking consistency of all components of python development environment... yes
graph-tool will be installed at: /Users/daze/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
===========================
Using python version: 2.7.3
===========================
checking for boostlib >= 1.38.0... configure: error: We could not detect the boost
libraries (version 1.38 or higher). If you have a staged boost library (still not installed)
please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.
If you are sure you have boost installed, then check your version number looking in
<boost/version.hpp>. See http://randspringer.de/boost for more documentation.
尝试 2:然后我尝试正确设置 BOOST_ROOT:
在我的 ~/.bash_profile 中:
export BOOST_ROOT="/usr/local/boost_1_55_0"
但还是没用,所以我取消了。
尝试 3:然后我尝试明确指定 boost 的安装位置:
./configure --with-boost="/usr/local/boost_1_55_0" PYTHON_EXTRA_LDFLAGS="-L/usr/local/bin"
但它仍然找不到 boost,并在“我们无法检测到 boost 库(1.38 版或更高版本)”末尾产生同样的错误。
整天都在烦我。我已经仔细阅读,并访问了 randspringer.de/boost 网站并在常见问题解答中看到了这一点 - http://www.randspringer.de/boost/faq.html#id2514912:
问:我不明白配置错误信息
在配置时我得到:
检查 boostlib >= 1.33... 配置:错误:我们无法检测到 boost 库(1.33 或更高版本)。如果你有一个分阶段 boost 库(仍未安装)请在您的 环境,并且不要为 --with-boost 选项提供 PATH 。如果你是 确保您已安装 boost,然后检查您的版本号 在 。请参阅http://randspringer.de/boost 了解更多信息 文档。
我不知道我是否使用了分阶段的 boost。它是什么,什么 我可以吗?
A:如果你没有自己编译 Boost,你就没有 staged 版本,您不必设置 BOOST_ROOT。在这里寻找一个 不同类型的安装说明。
如果您确定已安装 Boost,请指定目录 与
./configure --with-boost=your-boost-directory.
如果还是不行,请检查版本号 boost/version.hpp 并将其与请求的版本进行比较 配置.ac。
而且我不知道在比较版本号时会看到什么。那里没有我觉得有趣的东西。
希望有人对采取其他方法至少有一个想法。
【问题讨论】:
标签: python c++ macos boost installation