mnyon-grandkru / knowledgebase

An issue tracker of error messages discovered while developing as well as their solution.
https://github.com/mnyon-grandkru/knowledgebase/issues
MIT License
2 stars 0 forks source link

Error installing ovirt-engine-sdk gem #43

Closed trystant closed 6 years ago

trystant commented 6 years ago
Fetching ovirt-engine-sdk 4.2.4
Installing ovirt-engine-sdk 4.2.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/rvm/gems/ruby-2.4.1@ebwiki/gems/ovirt-engine-sdk-4.2.4/ext/ovirtsdk4c
/usr/local/rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180810-5621-k3ehe3.rb extconf.rb
checking for xml2-config... 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/local/rvm/rubies/ruby-2.4.1/bin/$(RUBY_BASE_NAME)
        --with-libxml2-config
        --without-libxml2-config
        --with-pkg-config
        --without-pkg-config
extconf.rb:29:in `<main>': The "libxml2" package isn't available. (RuntimeError)

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

  /usr/local/rvm/gems/ruby-2.4.1@ebwiki/extensions/x86_64-linux/2.4.0/ovirt-engine-sdk-4.2.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.4.1@ebwiki/gems/ovirt-engine-sdk-4.2.4 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.4.1@ebwiki/extensions/x86_64-linux/2.4.0/ovirt-engine-sdk-4.2.4/gem_make.out
trystant commented 6 years ago

This needed the libxml2 and curl libraries to be installed on my development environment. Those are installed using the following commands:

$ sudo yum install libxml2-devel
$ sudo yum install curl-devel
Jay-Dabo commented 5 years ago

You can easy solve this on linux/debian or ubuntu by running sudo apt-get install build-essential libcurl4-openssl-dev then after run sudo apt-get install libxml2-dev

You should be fine