问题描述
我尝试在 RHEL 服务器上安装 Cargo:
I tried installing Cargo on a RHEL server with:
curl https://sh.rustup.rs -sSf | sh
但完成后,我得到了回复:
but after finishing, I get the response:
cargo
-bash: cargo: command not found
有其他的安装方式吗?
推荐答案
首先启用
rhel-7-variant-devtools-rpms
存储库
subscription-manager repos --enable rhel-7-varient-devtools-rpms
将 variant
替换为 Red Hat Enterprise Linux 系统变体(server
或 workstation
)
启用 rhel-variant-rhscl-7-rpms
存储库:
subscription-manager repos --enable rhel-variant-rhscl-7-rpms
将 Red Hat Developer Tools 密钥添加到您的系统:
Add the Red Hat Developer Tools key to your system:
cd/etc/pki/rpm-gpg
wget -O RPM-GPG-KEY-redhat-devel https://www.redhat.com/security/data/a5787476.txt
rpm --import RPM-GPG-KEY-redhat-devel
将订阅附加到系统并启用存储库后,您可以安装 Red Hat Rust 工具集
Once the subscription is attached to the system and repositories enabled, you can install Red Hat Rust Toolset
然后安装rust-toolset-7
yum install rust-toolset-7
Cargo 由 rust-toolset-7-cargo
包提供,并随 rust-toolset-7
包自动安装.
Cargo is provided by the rust-toolset-7-cargo
package and is automatically installed with the rust-toolset-7
package.
这篇关于如何在 RHEL Linux 服务器上安装 Cargo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!