我正在安装一个应用程序,我在这一步,我应该运行bundle install,我收到此错误
enter code here➜ mavatar git:(master) ✗ bundle install
Fetching gem metadata from http://rubygems.org/
Fetching version metadata from http://rubygems.org/
Fetching dependency metadata from http://rubygems.org/
Using rake 0.9.2
Using multi_json 1.8.2
Using bcrypt-ruby 3.0.1
Using builder 3.0.4
Using i18n 0.6.5
Using erubis 2.7.0
Using rack 1.3.6
Using hike 1.2.1
Using tilt 1.3.3
Installing nokogiri 1.5.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/farbodi/.rvm/gems/ruby-2.3.0-
dev/gems/nokogiri-1.5.0/ext/nokogiri
/home/farbodi/.rvm/rubies/ruby-2.3.0-dev/bin/ruby -r
./siteconf20160806-31805-mdcnrl.rb extconf.rb
*** 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/farbodi/.rvm/rubies/ruby-2.3.0-dev/bin/$(RUBY_BASE_NAME)
extconf.rb:10:in `<main>': uninitialized constant Config (NameError)
Did you mean? RbConfig
CONFIG
extconf failed, exit code 1
Gem files will remain installed in /home/farbodi/.rvm/gems/ruby-
2.3.0-dev/gems/nokogiri-1.5.0 for inspection.
Results logged to /home/farbodi/.rvm/gems/ruby-2.3.0-
dev/extensions/x86_64-linux/2.3.0/nokogiri-1.5.0/gem_make.out
Your Gemfile.lock is corrupt. The following gems are missing from the
DEPENDENCIES section: 'archive-tar-minitar' 'hoe' 'rcov'
所以我试着运行它:gem update
gem install hoe
gem install rcov
gem install archive-tar-minitar
gem install nokogiri -v 1.5.0 which gives me ERROR: Failed to build gem native extension. error
我还安装了捆绑旧版本,我可以通过这一步但我在其他地方遇到同样的问题。 我也使用rvm和我的ruby版本是ruby 2.3.0p0(2015-12-25修订版53290)[x86_64-linux],和Bundler版本1.12.5
我是ruby,gem和bundle的新手我很困惑,我不知道如何开始学习正在发生的事情以及如何解决错误。
答案 0 :(得分:0)
您需要安装一些系统包。
如果您使用的是基于红帽,请安装libxml2
和libxslt
以及zlib-devel
如果您使用的是debian,请安装zlib1g-dev
和liblzma-dev
个套件