当我在Ubuntu上编译一个包时,我会收到这个错误
x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory
我所有必需的库都在名为CUSENV的conda环境中
诊断
conda环境激活后:
find /usr -name "cc1plus"
/usr/lib/gcc/x86_64-linux-gnu/7/cc1plus
-
我也可以看到这个可执行文件:
/home/ms/anaconda3/envs/CUSENV/libexec/gcc/x86_64-unknown-linux-gnu/4.8.5/cc1plus
-
echo $PATH
/home/ms/anaconda3/envs/CUSENV/bin:/home/ms/anaconda3/bin:/home/ms/anaconda3/bin:/home/ms/anaconda3/bin:/home/ms/anaconda3/bin:/home/ms/anaconda3/condabin:/home/ms/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
如何正确连接此cc1plus
您应该首先安装g++
conda install -c conda-forge gxx_linux-64
然后
cd /home/ms/anaconda3/envs/CUSENV/bin
ln -s /home/ms/anaconda3/envs/CUSENV/bin/x86_64-conda_cos6-linux-gnu-g++ g++