我在尝试为centos7编译boost 1.66.0时出现了参数错误。我是新手来提升和/或编译,所以我被困住了。任何想法都会有所帮助。
# compile command used:
wget https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
tar -xzf boost_1_66_0.tar.gz && cd boost_1_66_0
./bootstrap.sh --prefix=/opt/boost
./b2 install --prefix=/opt/boost --with=all
我得到的错误是:
[root@app1 boost_1_66_0]# ./b2 install --prefix=/opt/boost --with=all
/tmp/boost_1_66_0/tools/build/src/build/toolset.jam:43: in toolset.using
*** argument error
* rule python.init ( version ? : cmd-or-prefix ? : includes * : libraries ? : condition * : extension-suffix ? )
* called with: ( run: /usr/bin/python -c import sys; print (%d.%d % (sys.version_info[0], sys.version_info[1])) 2.7 : run: /usr/bin/python -c import sys; print(sys.prefix) /usr : : : : : : )
* extra argument /usr/bin/python
/tmp/boost_1_66_0/tools/build/src/tools/python.jam:104:see definition of rule 'python.init' being called
/tmp/boost_1_66_0/tools/build/src/build/project.jam:1052: in using
project-config.jam:23: in modules.load
/tmp/boost_1_66_0/tools/build/src/build-system.jam:249: in load-config
/tmp/boost_1_66_0/tools/build/src/build-system.jam:412: in load-configuration-files
/tmp/boost_1_66_0/tools/build/src/build-system.jam:524: in load
/tmp/boost_1_66_0/tools/build/src/kernel/modules.jam:295: in import
/tmp/boost_1_66_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build
/tmp/boost_1_66_0/boost-build.jam:17: in module scope
答案 0 :(得分:0)
谢谢你说这是问题 - 提升选择了不同版本的python,这不是股票python库。这解决了这个问题。