LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-08-2020, 07:09 AM   #1
mixmegapol
LQ Newbie
 
Registered: Sep 2020
Location: CH
Distribution: Manjaro
Posts: 5

Rep: Reputation: Disabled
CentOS 7 : vagrant-libvirt install failes


Hello all

I would like to install vagrant with libvirt module and cannot install it.
Does somebody has any idea?

I googled but couldn't find the solution.



[root@localhost ~]# vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Building native extensions. This could take a while...
Building native extensions. This could take a while...
Vagrant failed to properly resolve required dependencies. These
errors can commonly be caused by misconfigured plugin installations
or transient network issues. The reported error is:

ERROR: Failed to build gem native extension.

current directory: /root/.vagrant.d/gems/2.6.6/gems/ruby-libvirt-0.7.1/ext/libvirt
/opt/vagrant/embedded/bin/ruby -I /opt/vagrant/embedded/lib/ruby/2.6.0 -r ./siteconf20200908-41423-jy4zr4.rb extconf.rb
*** 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=/opt/vagrant/embedded/bin/$(RUBY_BASE_NAME)
--with-libvirt-include
--without-libvirt-include
--with-libvirt-lib
--without-libvirt-lib
--with-libvirt-config
--without-libvirt-config
--with-pkg-config
--without-pkg-config
extconf.rb:73:in `<main>': libvirt library not found in default locations (RuntimeError)

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

/root/.vagrant.d/gems/2.6.6/extensions/x86_64-linux/2.6.0/ruby-libvirt-0.7.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /root/.vagrant.d/gems/2.6.6/gems/ruby-libvirt-0.7.1 for inspection.
Results logged to /root/.vagrant.d/gems/2.6.6/extensions/x86_64-linux/2.6.0/ruby-libvirt-0.7.1/gem_make.out



declare -x PATH="/home/bod/.local/bin:/home/bod/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"



"gcc -o conftest -I/opt/vagrant/embedded/include/ruby-2.6.0/x86_64-linux -I/opt/vagrant/embedded/include/ruby-2.6.0/ruby/backward -
I/opt/vagrant/embedded/include/ruby-2.6.0 -I. -I/opt/vagrant/embedded/include -I/opt/vagrant/embedded/include -I/opt/vagrant/embe
dded/include -fPIC conftest.c -L. -L/opt/vagrant/embedded/lib -Wl,-rpath,/opt/vagrant/embedded/lib -L/opt/vagrant/embedded/lib -Wl
,-rpath,/opt/vagrant/embedded/lib -L. -L/opt/vagrant/embedded/lib -L/opt/vagrant/embedded/lib64 -Wl,-rpath=/opt/vagrant/embedded/li
b:/opt/vagrant/embedded/lib64 -fstack-protector-strong -rdynamic -Wl,-export-dynamic -L/opt/vagrant/embedded/lib -Wl,-rpath,/opt/v
agrant/embedded/lib -Wl,-rpath,'/../lib' -Wl,-rpath,'/../lib' -lruby -lvirt -lm -lc"
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_derive@OPENSSL_1_1_1b'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_ctrl@OPENSSL_1_1_1b'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_CTX_free@OPENSSL_1_1_1b'
//usr/lib64/libk5crypto.so.3: undefined reference to `EVP_KDF_CTX_new_id@OPENSSL_1_1_1b'
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */

package configuration for libvirt is not found


Installedlibvirt-4.5.0-42.module_el8.2.0+320+13f867d7.x86_64
vagrant-2.2.10-1.x86_64
ruby-2.5.5-105.module_el8.1.0+214+9be47fd7.x86_64
 
Old 09-09-2020, 12:01 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Hmmm, this is Centos 7, and yet
Code:
 Installedlibvirt-4.5.0-42.module_el8.2.0+320+13f867d7.x86_64
this is a libvirt package for Enterprise Linux 8.2. The ruby package is el8.1.0, by the way.

Check what version of libvirt is installed, and install a version that matches your OS.

Also try to find more details in /root/.vagrant.d/gems/2.6.6/extensions/x86_64-linux/2.6.0/ruby-libvirt-0.7.1/mkmf.log.

I wonder, how did you install Vagrant and/or Ruby?

Last edited by berndbausch; 09-09-2020 at 12:03 AM.
 
1 members found this post helpful.
Old 09-09-2020, 01:33 AM   #3
mixmegapol
LQ Newbie
 
Registered: Sep 2020
Location: CH
Distribution: Manjaro
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hello Berndbausch

Oh yes,true, I have CentOS 8.2 installed (really thought it was CentOS 7).

I follow this course:
https://www.udemy.com/course/devops-...11642348#notes
followed by:
https://www.udemy.com/course/devops-...using-ansible/

have to reinstall server as I really want to do it with CentOS 7.

Regards
Daniel
 
Old 09-09-2020, 06:18 AM   #4
mixmegapol
LQ Newbie
 
Registered: Sep 2020
Location: CH
Distribution: Manjaro
Posts: 5

Original Poster
Rep: Reputation: Disabled
OK, please excuse.

Now it worked fine!
Thank you for the hint.

[root@bod-test ~]# vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Fetching excon-0.76.0.gem
Fetching formatador-0.2.5.gem
Fetching fog-core-2.2.0.gem
Fetching fog-json-1.2.0.gem
Fetching mini_portile2-2.4.0.gem
Fetching nokogiri-1.10.10.gem
Building native extensions. This could take a while...
Fetching fog-xml-0.1.3.gem
Fetching ruby-libvirt-0.7.1.gem
Building native extensions. This could take a while...
Fetching fog-libvirt-0.7.0.gem
Fetching vagrant-libvirt-0.1.2.gem
Installed the plugin 'vagrant-libvirt (0.1.2)'!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Use Vagrant With Libvirt KVM Provider LXer Syndicated Linux News 0 08-28-2020 04:32 AM
LXer: Vagrant Tutorial – Getting Started With Vagrant LXer Syndicated Linux News 0 08-26-2020 04:39 PM
LXer: Vagrant: Sharing folders with vagrant-sshfs LXer Syndicated Linux News 0 04-05-2016 01:53 PM
Vagrant+Ansible playbooks. How to use same playbook on non vagrant provision markotitel Linux - Virtualization and Cloud 1 12-06-2013 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration