如何在 RHEL Linux 服务器上安装 Cargo? [英] How to install Cargo on a RHEL Linux server?

查看:36
本文介绍了如何在 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

variant 替换为 Red Hat Enterprise Linux 系统变体(serverworkstation)

Replace variant with the Red Hat Enterprise Linux system variant (server or 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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆