2016-10-23 143 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

你是否在安装方向上做了第一步?如果是这样,你是否搜索任何有关这方面的支持问题? –