【ubuntu 18.04】安装RVM

2021/12/23 7:13:57

本文主要是介绍【ubuntu 18.04】安装RVM,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1. 官网

# 二进制包
https://rubies.travis-ci.org/
# 官网
https://rvm.io/

2. 安装文档

https://rvm.io/rvm/install

3. 安装步骤

sudo apt install gnupg2
# 配置秘钥
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable --rails
# 上面可能会报错 keyserver, 按照提示,执行如下
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
# 重新安装
curl -sSL https://get.rvm.io | bash -s stable --rails
# 生效已有窗口
source /home/master/.rvm/scripts/rvm
nvm -v

4. 安装过程示例

master@master:~$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: keyserver receive failed: Server indicated a failure
master@master:~$ curl -sSL https://get.rvm.io | bash -s stable --rails
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
curl: (56) Unexpected EOF

Could not download 'https://github.com/rvm/rvm/archive/1.29.12.tar.gz'.
  curl returned status '56'.

Downloading https://bitbucket.org/mpapis/rvm/get/1.29.12.tar.gz
Downloading https://bitbucket.org/mpapis/rvm/downloads/1.29.12.tar.gz.asc
gpg: Signature made 2021年01月16日 星期六 02时46分26秒 CST
gpg:                using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: Can't check signature: No public key
GPG signature verification failed for '/home/master/.rvm/archives/rvm-1.29.12.tgz' - 'https://bitbucket.org/mpapis/rvm/downloads/1.29.12.tar.gz.asc'! Try to install GPG v2 and then feh the public key:

    gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

or if it fails:

    command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
    command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -

In case of further problems with validation please refer to https://rvm.io/rvm/security

master@master:~$ curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
gpg: key 3804BB82D39DC0E3: 47 signatures not checked due to missing keys
gpg: /home/master/.gnupg/trustdb.gpg: trustdb created
gpg: key 3804BB82D39DC0E3: public key "Michal Papis (RVM signing) <mpapis@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: no ultimately trusted keys found
master@master:~$ curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
gpg: key 105BD0E739499BDB: public key "Piotr Kuczynski <piotr.kuczynski@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
master@master:~$ curl -sSL https://get.rvm.io | bash -s stable --rails
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
curl: (56) Unexpected EOF

Could not download 'https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc'.
  curl returned status '56'.

Installing RVM to /home/master/.rvm/
    Adding rvm PATH line to /home/master/.profile /home/master/.mkshrc /home/master/.bashrc /home/master/.zshrc.
    Adding rvm loading line to /home/master/.profile /home/master/.bash_profile /home/master/.zlogin.
Installation of RVM in /home/master/.rvm/ is almost complete:

  * To start using RVM you need to run `source /home/master/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
Thanks for installing RVM 

	


这篇关于【ubuntu 18.04】安装RVM的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程