2011-09-14 16 views
5

मैं वर्तमान में एक रूबी मणि स्थापित करने की कोशिश कर रहा हूं जो विफल रहता है क्योंकि extconf कहता है कि इसे libxml की आवश्यकता है, इसलिए जब मैं these libxml स्थापित करने के निर्देशों का पालन करता हूं (जिसमें these शामिल है माणिक देव किट स्थापना के लिए) मैं निम्नलिखित आउटपुट प्राप्त निर्देश:मैं 'extconf विफलता के बिना रूबी मणि libxml कैसे स्थापित करूं: libxml2 की आवश्यकता है'

$ gem install libxml-ruby --platform x86-mswin32-60 
Temporarily enhancing PATH to include DevKit... 
Building native extensions. This could take a while... 
ERROR: Error installing libxml-ruby: 
    ERROR: Failed to build gem native extension. 

    c:/Ruby/bin/ruby.exe extconf.rb 
checking for socket() in -lsocket... no 
checking for gethostbyname() in -lnsl... no 
checking for atan() in -lm... yes 
checking for inflate() in -lz... no 
checking for inflate() in -lzlib... no 
checking for inflate() in -lzlib1... yes 
checking for iconv_open() in -liconv... no 
checking for libiconv_open() in -liconv... 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 
--8<-- 
    --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 

Gem files will remain installed in c:/Ruby/lib/ruby/gems/1.9.1/gems/libxml-ruby-2.2.2 for inspection. 
Results logged to c:/Ruby/lib/ruby/gems/1.9.1/gems/libxml-ruby-2.2.2/ext/libxml/gem_make.out 

मैं एक विंडोज 7 64 पर हूँ स्थापित करने के लिए मेरी minGW32-खोल/Git का उपयोग कर स्थापित करें। इंस्टॉल विंडोज़ रूबी-एन्हांस्ड कमांड प्रोम से उसी संदेश के साथ विफल रहता है।

fwiw:

$ ruby -v 
ruby 1.9.2p290 (2011-07-09) [i386-mingw32] 

$ git --version 
git version 1.7.6.msysgit.0 

$ gem -v 
1.8.10 
+0

इस सवाल का जवाब समस्या हल हो: http : //stackoverflow.com/questions/2915788/libxml-ruby-failed-to-load-at-x86-64 – Zaz

+0

मुझे यह टिप्पणी याद आई। आपको इस लिंक को एक उत्तर के रूप में पोस्ट करना चाहिए ताकि अन्य आसानी से उत्तर देख सकें। – Kelvin

उत्तर

0

कोशिश

yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel 

चलाने के लिए से यह काम करना चाहिए

+0

ओपी स्पष्ट रूप से कहता है कि वह विंडोज – Fitzsimmons

+0

पर है अभी भी मेरे लिए उपयोगी है। धन्यवाद। – penner

+0

उबंटू पर, यह 'sudo apt-get libxml2-dev' –

1

इसके बजाय आप libxml-ruby का उपयोग करने का nokogiri मणि कोशिश करनी चाहिए। इसमें इंस्टॉलेशन के हिस्से के रूप में precompiled libxml2 dlls शामिल हैं, इसलिए आपको इसे स्वयं बनाने के बारे में चिंता करने की आवश्यकता नहीं है।

नोकोगिरी का एपीआई libxml-ruby से अलग है, लेकिन मुझे यकीन है कि आपको वही कार्यक्षमता मिल जाएगी।

यदि libxml-ruby किसी अन्य मणि या ऐप के लिए निर्भरता है, तो आप शायद नोकोगिरी का उपयोग नहीं कर सकते हैं। तुम क्या करने की कोशिश कर रहे हो?

+0

स्थापित करें यह था! महान जवाब, 'yum' या 'apt-get' की आवश्यकता नहीं है ... –

1

मैं एक टिप्पणी के रूप में इस किया था, लेकिन दृश्यता के लिए एक जवाब के रूप में पोस्ट करने के लिए कहा गया था:

इस सवाल का जवाब मेरी समस्या हल: libxml-ruby failed to load at x86_64