本文介绍了如何在RHEL Linux服务器上安装Cargo?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用以下方法在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

有其他安装方式吗?

推荐答案

  1. 首先启用rhel-7-variant-devtools-rpms存储库

subscription-manager repos --enable rhel-7-varient-devtools-rpms

  • 启用rhel-variant-rhscl-7-rpms存储库:

  • Enable the rhel-variant-rhscl-7-rpms repository:

    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 Toolset

    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

    货物由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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

  • 07-17 04:16