我正在尝试在 Ubuntu 16.04 上安装 Ruby。但是,当我在终端输入以下命令时:
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
我得到以下信息:
Downloading https://github.com/rvm/rvm/archive/1.29.1.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc
gpg: Signature made 19 فبر, 2017 EET 10:02:47 م using RSA key ID ********
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).
GPG signature verification failed for '/home/tamer/.rvm/archives/rvm-1.29.1.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys ****************************************
or if it fails:
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
the key can be compared with:
https://rvm.io/mpapis.asc
https://keybase.io/mpapis
NOTE: GPG version 2.1.17 have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
当我尝试任何 rvm 命令时,我得到“命令未找到”。
我尝试请求https://rvm.io/mpapis.asc https://rvm.io/mpapis.asc通过浏览器。然后运行以下命令:
$ gpg --import mpapis.asc
但我得到以下信息:
gpg: fatal: can't open `/home/tamer/.gnupg/trustdb.gpg': Permission denied
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/65536
我不习惯做一些我不明白的事情,所以我停止了他们并且没有尝试 sudo。
那么我该如何安装Ruby呢?
Update
我还尝试使用以下命令安装 gpg2:
$ sudo apt-get install gnupg2 -y
然后我尝试了
$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys <key>
and also
$ curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
但是,当我尝试使用第一个命令安装 rvm 时,结果仍然相同。
注:我注意到我有 gpg v1.4.20 和 gpg2 v2.1.11