由于gpg错误,无法在Ubuntu 16.04上安装Ruby rvm [英] Can't install Ruby rvm on Ubuntu 16.04 due to gpg bug

查看:568
本文介绍了由于gpg错误,无法在Ubuntu 16.04上安装Ruby rvm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu 16.04上安装Ruby.但是,当我在终端输入以下命令时:

I'm trying to install Ruby on Ubuntu 16.04. However when I enter to following command to terminal:

$ \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命令时,我得到找不到命令".

When I tried any rvm command I got 'command not found'.

我尝试通过浏览器请求 https://rvm.io/mpapis.asc .然后运行以下命令:

I tried requesting https://rvm.io/mpapis.asc through the browser. Then running the following:

$ gpg --import mpapis.asc

但是我得到了以下内容:

but I got the following:

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.

I'm not used to do something that I don't understand, so I stopped their and didn't try sudo.

那我该如何安装Ruby?

So how can I install Ruby?

更新

我还尝试使用以下方法安装gpg2:

I also tried installing gpg2 using:

$ sudo apt-get install gnupg2 -y

然后我尝试了

$ gpg2 --keyserver hkp://keys.gnupg.net --recv-keys <key>

还有

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

但是,当我尝试使用第一个命令安装rvm时,结果仍然相同.

But still, the same result when I try install rvm with the first command.

n.b.我注意到我有gpg v1.4.20和gpg2 v2.1.11

n.b. I noticed that I have gpg v1.4.20 and gpg2 v2.1.11

推荐答案

尝试了许多方法之后.我确实成功安装了rails,如下所示:

After trying many ways. I did succeed to install rails as follows:

$ \curl -sSL https://get.rvm.io | bash
$ source /home/<user>/.rvm/scripts/rvm
$ rvm -v
$ rvm install ruby
$ ruby -v
$ sudo apt-get install rubygems
$ gem update
$ sudo apt-get install ruby-dev zlib1g-dev liblzma-dev build-essential patch
$ rvm gemset list
$ gem install rails
$ rails -v

用户"是我的用户名

这篇关于由于gpg错误,无法在Ubuntu 16.04上安装Ruby rvm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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