我怎样才能让Graph-tool找到boost库并安装它?

时间:2017-01-23 09:05:59

标签: boost graph-tool

我正在尝试安装Graph-tool,但会返回以下错误。

./cofigure
...
...
graph-tool will be installed at: /home/my_name/anaconda2/lib/python2.7/site-packages
===========================
Using python version: 2.7.12
===========================
checking for boostlib >= 1.54.0... configure: We could not detect the boost libraries (version 1.54 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.
checking whether the Boost::Python library is available... yes
checking whether boost_python is the correct library... yes
checking whether the Boost::IOStreams library is available... yes
configure: error: Could not link against boost_python !

看来这个错误与之相同 Installing Thrift on CentOS: can't find Boost 1.40 or higher 。所以我想我应该建立一个合适的符号链接让配置文件找到boost库的路径。但是我不确定我应该在哪里建立链接,因为“find”命令的结果与上述问题的提问者不同。

[root@localhost my_name]# su
[root@localhost my_name]# find / -name boost
/home/my_name/python/graph-tool-2.19/src/boost-workaround/boost
/home/my_name/boost_1_63_0/doc/html/boost
/home/my_name/boost_1_63_0/doc/test/gold/boost
/home/my_name/boost_1_63_0/tools/boostbook/test/doxygen/boost
/home/my_name/boost_1_63_0/boost
/home/my_name/boost_1_63_0/boost/chrono/typeof/boost
/home/my_name/boost_1_63_0/boost/hana/ext/boost
/home/my_name/boost_1_63_0/libs/sort/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/sort/doc/html/boost
/home/my_name/boost_1_63_0/libs/chrono/stopwatches/include/boost
/home/my_name/boost_1_63_0/libs/hana/example/ext/boost
/home/my_name/boost_1_63_0/libs/hana/test/ext/boost
/home/my_name/boost_1_63_0/libs/vmd/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/convert/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/convert/doc/html/boost
/home/my_name/boost_1_63_0/libs/functional/overloaded_function/doc/html/boost
/home/my_name/boost_1_63_0/libs/math/include_private/boost
/home/my_name/boost_1_63_0/libs/compute/doc/html/boost
/home/my_name/boost_1_63_0/libs/pool/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/pool/doc/html/boost
/home/my_name/boost_1_63_0/libs/log/doc/html/boost
/home/my_name/boost_1_63_0/libs/tti/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/tti/doc/html/boost
/home/my_name/boost_1_63_0/libs/icl/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/icl/doc/html/boost
/home/my_name/boost_1_63_0/libs/numeric/odeint/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/numeric/odeint/doc/html/boost
/home/my_name/boost_1_63_0/libs/core/doc/html/boost
/home/my_name/boost_1_63_0/libs/test/doc/html/header/boost
/home/my_name/boost_1_63_0/libs/test/doc/html/boost
/usr/local/cuda-8.0/samples/6_Advanced/interval/boost
/usr/include/boost

有人知道如何解决这个问题吗?非常感谢你提前。

1 个答案:

答案 0 :(得分:0)

发布此问题后,我设法自己解决了这个问题。

似乎发生了错误,因为Boost实际上没有正确安装。

这一次,我做了:

$ cd /usr/local
$ tar --bzip2 -xf boost_1_63_0.tar.bz2
$ cd boost_1_63_0.tar.bz2
$ sh ./bootstrap.sh
$ sudo ./b2 install

然后,我找到了以下目录。

$ sudo find / -name boost

/home/tokudakeita/python/graph-tool-2.19/src/boost-workaround/boost
/usr/local/boost_1_63_0/doc/html/boost
/usr/local/boost_1_63_0/doc/test/gold/boost
/usr/local/boost_1_63_0/tools/boostbook/test/doxygen/boost
/usr/local/boost_1_63_0/boost
/usr/local/boost_1_63_0/boost/chrono/typeof/boost
/usr/local/boost_1_63_0/boost/hana/ext/boost
/usr/local/boost_1_63_0/libs/sort/doc/html/header/boost
/usr/local/boost_1_63_0/libs/sort/doc/html/boost
/usr/local/boost_1_63_0/libs/chrono/stopwatches/include/boost
/usr/local/boost_1_63_0/libs/hana/example/ext/boost
/usr/local/boost_1_63_0/libs/hana/test/ext/boost
/usr/local/boost_1_63_0/libs/vmd/doc/html/header/boost
/usr/local/boost_1_63_0/libs/convert/doc/html/header/boost
/usr/local/boost_1_63_0/libs/convert/doc/html/boost
/usr/local/boost_1_63_0/libs/functional/overloaded_function/doc/html/boost
/usr/local/boost_1_63_0/libs/math/include_private/boost
/usr/local/boost_1_63_0/libs/compute/doc/html/boost
/usr/local/boost_1_63_0/libs/pool/doc/html/header/boost
/usr/local/boost_1_63_0/libs/pool/doc/html/boost
/usr/local/boost_1_63_0/libs/log/doc/html/boost
/usr/local/boost_1_63_0/libs/tti/doc/html/header/boost
/usr/local/boost_1_63_0/libs/tti/doc/html/boost
/usr/local/boost_1_63_0/libs/icl/doc/html/header/boost
/usr/local/boost_1_63_0/libs/icl/doc/html/boost
/usr/local/boost_1_63_0/libs/numeric/odeint/doc/html/header/boost
/usr/local/boost_1_63_0/libs/numeric/odeint/doc/html/boost
/usr/local/boost_1_63_0/libs/core/doc/html/boost
/usr/local/boost_1_63_0/libs/test/doc/html/header/boost
/usr/local/boost_1_63_0/libs/test/doc/html/boost
/usr/local/cuda-8.0/samples/6_Advanced/interval/boost
/usr/local/include/boost
/usr/local/include/boost/chrono/typeof/boost
/usr/local/include/boost/hana/ext/boost

我发现的只是

$ ./b2

不会创建以下目录:

/usr/local/include/boost
/usr/local/include/boost/chrono/typeof/boost
/usr/local/include/boost/hana/ext/boost

但是以下命令创建了上述目录:

$ sudo ./b2 install

然后,Graph-tool的配置文件成功找到了boost。