2016-10-23 140 views
0

我正在使用網絡抓取腳本,但當前的gem版本沒有給我任何要安裝的軟件包。如何在Windows 10上的Linux子系統上安裝RVM

我知道這是出於一些基礎設施更改的原因,但現在我已經安裝了Windows 10的週年更新並安裝了Linux子系統。

我已經安裝了NodeJS + npm,它們工作正常,但問題是在該子系統上安裝Ruby。

當我嘗試安裝RVM它給我一個錯誤:

[email protected]:~$ sudo apt-get install rvm 
sudo: unable to resolve host DESKTOP-TK9ELEL 
Reading package lists... Done 
Building dependency tree 
Reading state information... Done 
Some packages could not be installed. This may mean that you have 
requested an impossible situation or if you are using the unstable 
distribution that some required packages have not yet been created 
or been moved out of Incoming. 
The following information may help to resolve the situation: 

The following packages have unmet dependencies: 

rvm : Depends: libreadline6-dev but it is not installable 
     Depends: autoconf but it is not installable 
     Depends: libgdbm-dev but it is not installable 
     Depends: libncurses5-dev but it is not installable 
     Depends: automake but it is not installable 
     Depends: libtool but it is not installable 
     Depends: bison but it is not installable 
     Depends: pkg-config but it is not installable 
E: Unable to correct problems, you have held broken packages. 

如何解決這個問題?

回答

1

在他們的網站上關注install directions for RVM。沒有人比作者更瞭解RVM。

\curl -sSL https://get.rvm.io | bash -s stable --ruby 

這將安裝穩定版本的RVM和Ruby。

此之後使用:

rvm use [whichever Ruby was installed] --default 

告訴RVM默認爲是紅寶石。

如果您使用他們的指示,RVM能夠爲* nix發行版安裝先決條件。一旦安裝了RVM,您將不需要使用sudoyum爲RVM託管的Ruby安裝任何內容。這意味着不需要使用sudo rvm install ruby...sudo gem install some_gem。如果你這樣做,你只會強迫你的系統做錯事。

+0

亞我以前試過這個,但得到錯誤>>> GPG簽名驗證失敗'/home/ins/.rvm/archives/rvm-1.27.0.tgz' - 'https://github.com/rvm /rvm/releases/download/1.27.0/1.27.0.tar.gz.asc「! – insCode

+0

你是否在安裝方向上做了第一步?如果是這樣,你是否搜索任何有關這方面的支持問題? –