2017-08-29 8 views
5

नियमित स्क्रिप्ट और रेल ऐप दोनों में टवील-रूबी मणि स्थापित करने की कोशिश करने में परेशानी के घंटों के बाद मैं पेशेवरों के पास आया हूं।इंस्टॉल करें Twilio मणि - libxml मुद्दा

त्रुटि मैं हो रही है कि "Gemfile में: twilio-माणिक 5.2.0 का संकल्प लिया गया था, जो libxml-माणिक पर निर्भर करता है "

मैं अपने मणि फ़ाइल में libxml मणि स्थापित करने की कोशिश की और जो त्रुटि के साथ-साथ विफल रहता है "Gem :: Ext :: BuildError: ERROR: मणि देशी एक्सटेंशन बनाने में विफल।" और उसके बाद नीचे यह कहता है "libxml-ruby (3.0.0) स्थापित करते समय एक त्रुटि आई, और बंडलर जारी नहीं रह सकता। सुनिश्चित करें कि gem install libxml-ruby -v '3.0.0' बंडलिंग से पहले सफल होता है।"

रेल संस्करण जो मैं उपयोग कर रहा हूं वह 4.2.4 है और मेरा ओएस मैकोस सिएरा है। जब मैं twilio मणि के साथ स्थापित बंडल करने की कोशिश करता हूं तो पूरा आउटपुट नीचे है। Ive ढेर पर कुछ लेख पढ़ने लेकिन अभी तक कुछ भी मदद की है:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    current directory: /Users/jameshart/.rvm/gems/ruby-2.3.0/gems/libxml-ruby-3.0.0/ext/libxml 
/Users/jameshart/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20170829-79771-thonjl.rb extconf.rb 
checking for libxml/xmlversion.h in 
/opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... 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 
    --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=/Users/jameshart/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME) 
    --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 
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 


To see why this extension failed to compile, please check the mkmf.log which can be found here: 

    /Users/jameshart/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-16/2.3.0/libxml-ruby-3.0.0/mkmf.log 

extconf failed, exit code 1 

Gem files will remain installed in /Users/jameshart/.rvm/gems/ruby-2.3.0/gems/libxml-ruby-3.0.0 for inspection. 
Results logged to /Users/jameshart/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-16/2.3.0/libxml-ruby-3.0.0/gem_make.out 

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

In Gemfile: 
    twilio-ruby was resolved to 5.2.0, which depends on 
    libxml-ruby 
+0

मैं MacOS सिएरा है और इससे पहले कि Twilio मणि स्थापित नहीं किया है। मैंने 'मणि सूची' की और देखा कि मेरे पास 'libxml-ruby (2.6.0)' स्थापित है। मैं 'सुडो मणि स्थापित twilio-ruby' भाग गया और यह Twilio 5.2.0 मणि ठीक स्थापित किया। मेरे पास मेरे घर फ़ोल्डर में '.rvm' निर्देशिका नहीं है। मुझे आश्चर्य है कि क्या आप किसी भी तरह से उस संस्करण को हटाने का प्रयास कर सकते हैं और "मूल" पर वापस आ सकते हैं? क्षमा करें यह बहुत मदद नहीं है! – Andy

+0

मैं संस्करण 4.11 स्थापित करने में घायल हो गया और सबकुछ आसान हो गया। धन्यवाद। आप आदमी हैं –

+0

[libxml-ruby: मणि देशी एक्सटेंशन बनाने में विफल] के संभावित डुप्लिकेट (https://stackoverflow.com/questions/38129330/libxml-ruby-failed-to-build-gem-native-extension) – philnash

उत्तर

1

मैं एक समाधान मिल गया! (Debian 9 पर चल रहा है)

sudo apt-get install -y libxml2-dev 

gem install libxml-ruby -v '3.0.0' 

bundle install 

libxml-माणिक libxml2 का उपयोग करने की कोशिश कर के साथ एक समस्या की तरह लगता है

संबंधित मुद्दे