[英]Failed to Build Boost With devtoolsets-8-gcc?
I tried to build Boost 1.71.0:我尝试构建 Boost 1.71.0:
sudo ./bootstrap.sh --prefix=/opt/boost -with-toolset=gcc
And it gave:它给了:
Building Boost.Build engine with toolset gcc...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
$ cat bootstrap.log
B2_TOOLSET is gcc, but the 'gcc' command cannot be executed.
Make sure 'gcc' is in PATH, or use a different toolset.
However, gcc is indeed in PATH
:但是, gcc 确实在PATH
:
$ which gcc
/opt/rh/devtoolset-8/root/usr/bin/gcc
$ echo $PATH
/opt/rh/devtoolset-8/root/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/hc/.local/bin:/home/hc/bin
I wonder what goes wrong.我想知道出了什么问题。
Thanks.谢谢。
./bootstrap.sh is going to build the boost.build tool called b2, and install it at your prefix ./bootstrap.sh 将构建名为 b2 的 boost.build 工具,并将其安装在您的前缀中
Software collections work on a per user basis, so it might not work correctly with sudo.软件集合基于每个用户工作,因此它可能无法与 sudo 一起正常工作。 You can try to elevate to root with sudo -i
, turn on devtoolset-8 with scl enable devtoolset-8 bash
then attempt to build b2 and the rest of boost from there.您可以尝试使用sudo -i
提升到 root 权限,使用scl enable devtoolset-8 bash
然后尝试从那里构建 b2 和其余的 boost。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.