如何在CentOS的conda上包含所需的编译器?[已关闭]

fykwrbwg  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(173)

已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题吗?**通过editing this post添加详细信息并阐明问题。

两年前就关门了。
Improve this question
一些生产服务器往往有非常过时的linux版本。这使得整个业务虚拟环境在编译二进制文件时相当模糊。例如,ld通常从主机系统调用,而不是从虚拟环境调用。
我几乎没有找到关于如何在CentOS 7中成功编译rust项目的信息。我将这个问题与答案一起发布,因为根据stackoverflow),这是一个推荐的可行选项,因为这可能会帮助CentOS的未来用户。
对于rustcargo的基于conda的安装,缺少某些编译器链接器。

$ cargo build

   Compiling hello_cargo v0.1.0 (/local/users/me/src/rasti/hello_cargo)
error: linker `/full/path/to/conda/env/bin/x86_64-conda-linux-gnu-cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: could not compile `hello_cargo`.

To learn more, run the command again with --verbose.

系统运行:
3.10.0-1062.18.1.el7.x86_64

8nuwlpux

8nuwlpux1#

在conda环境中安装“gxx_linux-64”是不够的,只有在包含sysroot_linux-64之后,cargo才能编译。

相关问题