Anaconda中假造环境安装g++和gcc雷同版本

[复制链接]
发表于 2025-10-17 22:16:10 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
安装torchSDF的时间碰到的,这是g++和gcc版本差别等的题目
  1. gcc: fatal error: cannot execute 'cc1plus': execvp: No such file or directory compilation terminated.
复制代码
查察gcc, g++版本
  1. gcc --version | head -n1
  2. g++ --version | head -n1
复制代码
发现gcc的是anaconda中的,g++则是体系自带的:
  1. gcc (Anaconda gcc) 11.2.0
  2. g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
复制代码
直接运行以下下令即可
  1. conda install -c conda-forge cxx-compiler
复制代码
也可以查找某个详细的版本:
  1. conda search -c conda-forge gxx_linux-64
复制代码
好比须要安装 11.2.0
  1. conda install -c conda-forge gxx_linux-64=11.2.0
  2. conda install -c conda-forge cxx-compiler
复制代码
我这里有个小bug
  1. CondaVerificationError: The package for gcc located at xxx/pkgs/gcc-11.2.0-h702ea55_10
  2. appears to be corrupted. The path 'bin/gcov-tool'
  3. specified in the package manifest cannot be found.
复制代码
去把 xxx/pkgs/gcc-11.2.0-h702ea55_10 删除即可。
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表