2017-06-14 138 views
3

我試圖在Ubuntu 16.04上安裝Ruby。然而,當我進入到下面的命令終端:由於gpg bug,無法在Ubuntu 16.04上安裝Ruby rvm

$ \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。然後運行以下:

$ 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 

我不習慣做一些事情,我不明白,所以我停止了,並沒有嘗試須藤。

那麼我該如何安裝Ruby呢?

更新

我也嘗試安裝gpg2使用:

$ 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時仍然出現相同的結果。

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

回答

5

嘗試了很多方法之後。我沒有成功如下安裝導軌:

$ \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 

其中「用戶」是我的用戶名

+0

謝謝!最後,這對我有用! – Plavookac

+1

我是格萊德它幫助:) – TamerB

1

我有同樣的問題,但對Debian和我花了一個替代方法。在錯誤消息中,它表示:「嘗試安裝GPG v2,然後獲取公鑰:」,然後使用gpg2命令。我先去安裝gpg2,然後運行它告訴我的命令,它對我很有用。

sudo apt-get install gnupg2 
sudo apt-get install dirmngr 
gpg2 --recv-keys <key> 
# <Run curl command to install rvm> 
+0

我首先嚐試了這種方法。但是,由於某種原因,它在Ubuntu 16.04 LTS上不適用於我。很高興知道它在Debian上有效:) – TamerB