[英]Failed to Build Boost With devtoolsets-8-gcc?
我嘗試構建 Boost 1.71.0:
sudo ./bootstrap.sh --prefix=/opt/boost -with-toolset=gcc
它給了:
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.
但是, 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
我想知道出了什么問題。
謝謝。
./bootstrap.sh 將構建名為 b2 的 boost.build 工具,並將其安裝在您的前綴中
軟件集合基於每個用戶工作,因此它可能無法與 sudo 一起正常工作。 您可以嘗試使用sudo -i
提升到 root 權限,使用scl enable devtoolset-8 bash
然后嘗試從那里構建 b2 和其余的 boost。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.