我在 Windows 10(Linux 的 Windows 子系统)上运行 Debian,并使用以下命令安装了 Rust:
curl https://sh.rustup.rs -sSf | sh
安装没有错误,但是当我尝试使用 rustc
进行编译时,我得到了错误 linker 'cc' not found
。
原文由 Thane Plummer 发布,翻译遵循 CC BY-SA 4.0 许可协议
我在 Windows 10(Linux 的 Windows 子系统)上运行 Debian,并使用以下命令安装了 Rust:
curl https://sh.rustup.rs -sSf | sh
安装没有错误,但是当我尝试使用 rustc
进行编译时,我得到了错误 linker 'cc' not found
。
原文由 Thane Plummer 发布,翻译遵循 CC BY-SA 4.0 许可协议
6 回答1.7k 阅读
1 回答980 阅读✓ 已解决
1 回答707 阅读✓ 已解决
3 回答724 阅读✓ 已解决
1 回答1.5k 阅读
1 回答844 阅读✓ 已解决
2 回答621 阅读✓ 已解决
Linux Rust 安装程序不检查编译器工具链,但似乎假设您已经安装了 C 链接器!最好的解决方案是安装久经考验的 gcc 工具链。
如果您需要以其他架构为目标,请安装适当的工具链并以如下方式进行编译: