0
我正在與寶石'遊戲盒'第一次,我遇到了問題。我已經安裝了gem並生成了該指南指示的模板,但是當我試圖將其捆綁時,它將引發下面詳述的此錯誤。'捆綁'的問題與紅寶石'遊戲盒'
$ bundle install --path lib/dependencies
Fetching gem metadata from https://rubygems.org/.bundle install --path lib/dependencies
.......
Resolving dependencies...
Using rake 0.9.2.2
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using conject 0.1.8
Using cri 2.1.0
Using diff-lcs 1.2.5
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 extconf.rb
checking for socket() in -lsocket... no
checking for gethostbyname() in -lnsl... yes
checking for atan() in -lm... yes
checking for inflate() in -lz... yes
checking for iconv_open() in -liconv... no
checking for libiconv_open() in -liconv... no
checking for libiconv_open() in -llibiconv... no
checking for iconv_open() in -llibiconv... no
checking for iconv_open() in -lc... yes
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
checking for xmlParseDoc() in -lxml2... no
*** 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=/usr/bin/ruby2.1
--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-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-socketlib
--without-socketlib
--with-nsllib
--without-nsllib
--with-mlib
--without-mlib
--with-zlib
--without-zlib
--with-iconvlib
--without-iconvlib
--with-iconvlib
--without-iconvlib
--with-libiconvlib
--without-libiconvlib
--with-libiconvlib
--without-libiconvlib
--with-clib
--without-clib
--with-xml2-config
--without-xml2-config
--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-xml2lib
--without-xml2lib
--with-libxml2lib
--without-libxml2lib
--with-xml2lib
--without-xml2lib
extconf failure: need libxml2.
Install the library or try one of the following options to extconf.rb:
--with-xml2-config=/path/to/xml2-config
--with-xml2-dir=/path/to/libxml2
--with-xml2-lib=/path/to/libxml2/lib
--with-xml2-include=/path/to/libxml2/include
extconf failed, exit code 1
Gem files will remain installed in /home/user_id/company_office/lib/dependencies/ruby/2.1.0/gems/libxml-ruby-2.8.0 for inspection.
Results logged to /home/user_id/company_office/lib/dependencies/ruby/2.1.0/extensions/x86_64-linux/2.1.0/libxml-ruby-2.8.0/gem_make.out
An error occurred while installing libxml-ruby (2.8.0), and Bundler cannot
continue.
Make sure that `gem install libxml-ruby -v '2.8.0'` succeeds before bundling.
我已經嘗試使用gem install libxml-ruby -v '2.8.0'
以及sudo gem install libxml-ruby -v '2.8.0'
其輸出以下:
$ gem install libxml-ruby -v '2.8.0'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /var/lib/gems/2.1.0/gems/libxml-ruby-2.8.0/HISTORY
我新望紅寶石和Linux所以道歉,如果這是一個愚蠢的問題。 謝謝
太棒了!謝謝 'aptitude install libxml2-dev' – 2015-03-02 22:06:39
很高興我能幫忙 - 請你接受答案(點擊問題左側的勾號)。 – tpbowden 2015-03-03 09:33:14
Gamebox有測試它在TravisCI服務器上運行。該安裝程序有一個Linux安裝要求列表:https://github.com/shawn42/gamebox/blob/master/.travis.yml#L10-L12 – shawn42 2015-03-03 21:05:44