需要帮助才能安装Nokogiri

时间:2013-04-29 13:48:29

标签: ruby ubuntu nokogiri selenium-webdriver

我正在使用Ubuntu13.04。我使用Ruby2.0安装了RVM。但现在正在寻找安装nokogiriselenium-webdriver的指南。但没有找到使用RVM安装相同步骤说明的具体步骤。谁可以帮助我。

我使用link安装了Ruby,如下所示:

  

sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core   zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev \   libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison

     

\ curl -L https://get.rvm.io | bash -s stable --rails --autolibs = enabled

     

echo'[[-s“$ HOME / .rvm / scripts / rvm”]]&& 。 “$ HOME / .rvm / scripts / rvm”#Load RVM function'>> 〜/ .bash_profile中

     

source~ / .bash_profile

     

rvm install 2.0.0-p0

     

rvm使用--default 2.0.0-p0

     

ruby​​ -v

     

gem install rails --pre

当我在下面使用时出现错误:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev
[sudo] password for kirti: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
E: Unable to locate package libxslt
kirti@kirti-Aspire-5733Z:~$ 

由于

1 个答案:

答案 0 :(得分:1)

最后我完成了以下工作:

kirti@kirti-Aspire-5733Z:~$ sudo apt-get install libxml2-dev libxslt1-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libxml2-dev is already the newest version.
libxslt1-dev is already the newest version.
The following package was automatically installed and is no longer required:
  vim-runtime
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

kirti@kirti-Aspire-5733Z:~$ gem install nokogiri
Fetching: nokogiri-1.5.9.gem (100%)
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.5.9
Parsing documentation for nokogiri-1.5.9
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/nokogiri/nokogiri.so, skipping
Installing ri documentation for nokogiri-1.5.9
1 gem installed

kirti@kirti-Aspire-5733Z:~$ irb
2.0.0p0 :001 > require 'nokogiri'
 => true 
2.0.0p0 :002 >