已关闭。此问题需要details or clarity。当前不接受答案。
**想要改进此问题吗?**通过editing this post添加详细信息并阐明问题。
两年前就关门了。
Improve this question
一些生产服务器往往有非常过时的linux版本。这使得整个业务虚拟环境在编译二进制文件时相当模糊。例如,ld
通常从主机系统调用,而不是从虚拟环境调用。
我几乎没有找到关于如何在CentOS 7中成功编译rust项目的信息。我将这个问题与答案一起发布,因为根据stackoverflow),这是一个推荐的可行选项,因为这可能会帮助CentOS的未来用户。
对于rust
和cargo
的基于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
1条答案
按热度按时间8nuwlpux1#
在conda环境中安装“gxx_linux-64”是不够的,只有在包含
sysroot_linux-64
之后,cargo
才能编译。