linux下安装ruby版本管理器RVM

本文详细介绍了在Ubuntu系统中通过RVM安装Ruby的方法,包括从git仓库下载RVM,以及解决可能遇到的gpg密钥服务器问题,确保Ruby环境的顺利搭建。
                       

这里以ubuntu为例。

直接以如下命令行安装可能会不成功,因为rvm.io站点有时会被墙:

curl -sSL https://get.rvm.io | bash -s stable#或者curl -L https://rvm.io | bash -s stable
  
  • 1
  • 2
  • 3

没关系,我们可以直接从git仓库里下载并安装RVM,首先本地新建文件夹rvm:

mkdir rvmcd rvm
  
  • 1
  • 2

然后依次执行如下命令:

# Install mpapis public key (might need `gpg2` and or `sudo`)gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3# Download the installercurl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installercurl -O https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc# Verify the installer signature (might need `gpg2`), and if it validates...gpg --verify rvm-installer.asc &&# Run the installerbash rvm-installer stable
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

如果gpg –keyserver命令失败,用如下命令代替:

curl -sSL https://rvm.io/mpapis.asc | gpg --import -
  
  • 1

如果不出什么错误,RVM已经安装到系统上了,可以使用了。

           

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.youkuaiyun.com/jiangjunshow

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值