Я использую Ruby 2.1 на Ubuntu 12.10 64bit. Я не могу установить Nokogiri, потому что ему нужны libXSLT и libxml. Я попытался установить эти два, но получил эту ошибку:Nokogiri зависимость libxml и libxslt не устанавливается
***@***:~$ sudo apt-get install libxslt-dev libxml2-dev
[sudo] password for :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
libxml2-dev is already the newest version.
The following NEW packages will be installed:
libxslt1-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 578 kB of archives.
After this operation, 2,422 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: **The following packages cannot be authenticated!**
libxslt1-dev
Install these packages without verification [y/N]? y
Err http://security.ubuntu.com/ubuntu/ quantal-security/main libxslt1-dev amd64 1.1.26-14ubuntu0.1
404 Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxslt/libxslt1-dev_1.1.26-14ubuntu0.1_amd64.deb 404 Not Found [IP: 91.189.91.13 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing
Я пытался добавить обновления безопасности 12.04, а также, но все же этот шанс и не попал.
Я бежал sudo apt-get update
, но проблема все еще сохраняется.
Когда я бегу bundle install
или gem install nokogiri
, я получаю следующее сообщение об ошибке:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/####/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... no
-----
libxslt is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/kamal/.rvm/rubies/ruby-2.1.0/bin/ruby
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-libxslt-config
--without-libxslt-config
--with-pkg-config
--without-pkg-config
--with-libxml-2.0-config
--without-libxml-2.0-config
--with-libiconv-config
--without-libiconv-config
extconf failed, exit code 1
Gem files will remain installed in /home/kamal/.rvm/gems/[email protected]/gems/nokogiri-1.5.11 for inspection.
Results logged to /home/****/.rvm/gems/[email protected]/extensions/x86_64-linux/2.1.0/nokogiri-1.5.11/gem_make.out
An error occurred while installing nokogiri (1.5.11), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.5.11'` succeeds before bundling.
Вы можете принять этот ответ, если он решил вашу проблему –