2013-06-26 76 views
1

我有這個錯誤,當我運行同捆引入nokogiri安裝:安裝在1.5.9捆綁引入nokogiri的安裝

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /usr/bin/ruby1.9.1 extconf.rb 
checking for libxml/parser.h... no 
----- 
libxml2 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 
     .... 


Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri-1.5.9 for inspection. 
Results logged to /var/lib/gems/1.9.1/gems/nokogiri-1.5.9/ext/nokogiri/gem_make.out 

An error occurred while installing nokogiri (1.5.9), and Bundler cannot 
continue. 
Make sure that `gem install nokogiri -v '1.5.9'` succeeds before bundling. 

我可以怎樣糾正呢?

編輯讀取軟件包列表...完成正在
的依賴關係樹
讀取狀態信息...完成
注意:選擇「libxslt1-dev的「,而不是找不到建立必要的包裝
E::找不到包的libxml2
E:找不到libreadline6-dev的
E:找不到的libssl包 「的libxslt-dev的」
電子商務開發
E:無法找到ncurses的開發
E:找不到PostgreSQL相關的contrib包
E:找不到包libapr1
E:找不到的libpcap-dev的

回答

9

你需要之前引入nokogiri

安裝一些圖書館在Ubuntu中

sudo apt-get install libxslt-dev libxml2-dev 
+0

謝謝是一個很大的目標,我有啦即使得到錯誤:/,而安裝pcaprub(0.11.3)發生錯誤,並且捆紮機不能 繼續。 – newuser

+0

可以登錄爲pcaprub – Aguardientico

+0

什麼命令來做到這一點?謝謝你對我的幫助:) – newuser

1

這個工作對我來說:

$sudo apt-get install libpcap-dev 

$ bundle install