RVM简介
RVM是一个命令行工具,可以提供一个便捷的多版本Ruby环境的管理和切换
RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
RVM安装
Install GPG keys:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
如果报错1
-bash: gpg: command not found
解决方案
brew install gpg2
如果报错2:
gpg: 从公钥服务器接收失败:No route to host
解决方案
参考:
[http://rvm.io/rvm/security](http://rvm.io/rvm/security)
GPG
We use GPG for signing. Both gpg and gpg2 should be fine.
Sometimes gpg has problems downloading keys from remote server, it might >be better to work with gpg2 if it's available for your system. However it has >been reported that gpg2 in version 2.1.17 is also affected by such issue. We >recommend you to downgrade or upgrade it to a newer version.
####### ∞Install our keys
Make sure to only trust the keys of people you trust - if you trust to run our code - trust our keys. Here are the keys from our maintainers:
409B6B1796C275462A1703113804BB82D39DC0E3 # mpapis
7D2BAF1CF37B13E2069D6956105BD0E739499BDB # pkuczynski
As a first step, before attempting RVM install, you should install gpg2 and import those keys:
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
Solution: gpg: 从公钥服务器接收失败:No route to host
If you encounter problem with the key server above, try a different one. Some alternatives are presented below:
hkp://ipv4.pool.sks-keyservers.net
hkp://pgp.mit.edu
hkp://keyserver.pgp.com
另外解决方案
######## ∞Alternatives
Alternatively you might want to import keys directly from our web server, although this is a less secure way:
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
Run verified installation
We usually recommend everywhere to run installation using following command:
\curl -sSL https://get.rvm.io | bash -s stable
网友评论