Error installing vagrant-libvirt plugin on OS X - macos

I'm encountering the error below when running vagrant plugin install vagrant-libvirt
Setup
install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
install in Homebrew
brew install --cask vagrant && \
brew install make gcc qemu libiconv libvirt
double check libvirt path
➜ ~ brew --prefix libvirt
/opt/homebrew/opt/libvirt
Update path
HOMEBREW_HOME="/opt/homebrew/opt"
LIBICONV_HOME="$HOMEBREW_HOME/libiconv"
export PATH="$LIBICONV_HOME/bin:$PATH"
export PATH="$HOMEBREW_HOME/make/libexec/gnubin:$PATH"
export LDFLAGS="-L$LIBICONV_HOME/lib"
export CPPFLAGS="-I$LIBICONV_HOME/include"
export CONFIGURE_ARGS="with-libvirt-lib=$(brew --prefix libvirt)/lib with-libvirt-include=$(brew --prefix libvirt)/include"
Error
➜ ~ vagrant plugin install vagrant-libvirt
Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Fetching formatador-1.1.0.gem
Fetching fog-core-2.3.0.gem
Fetching fog-json-1.2.0.gem
Fetching nokogiri-1.13.9-x86_64-darwin.gem
Fetching fog-xml-0.1.4.gem
Fetching ruby-libvirt-0.8.0.gem
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: /Users/yakforward/.vagrant.d/gems/2.7.6/gems/ruby-libvirt-0.8.0/ext/libvirt
/opt/vagrant/embedded/bin/ruby -I /opt/vagrant/embedded/lib/ruby/2.7.0 -r ./siteconf20221111-11883-1v7zec5.rb extconf.rb
Looking for libvirt in /opt/homebrew/opt/libvirt/include and /opt/homebrew/opt/libvirt/lib
checking for virConnectOpen() in -lvirt... 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=/opt/vagrant/embedded/bin/$(RUBY_BASE_NAME)
--with-libvirt-include
--with-libvirt-lib
--with-virt-dir
--without-virt-dir
--with-virt-include
--without-virt-include=${virt-dir}/include
--with-virt-lib
--without-virt-lib=${virt-dir}/lib
--with-virtlib
--without-virtlib
extconf.rb:44:in `<main>': No working libvirt installation found (RuntimeError)
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/yakforward/.vagrant.d/gems/2.7.6/extensions/x86_64-darwin-19/2.7.0/ruby-libvirt-0.8.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/yakforward/.vagrant.d/gems/2.7.6/gems/ruby-libvirt-0.8.0 for inspection.
Results logged to /Users/yakforward/.vagrant.d/gems/2.7.6/extensions/x86_64-darwin-19/2.7.0/ruby-libvirt-0.8.0/gem_make.out
info
➜ ~ neofetch
'c. yakforward#yakforward.local
,xNMM. ---------------------------
.OMMMMo OS: macOS 13.0.1 22A400 arm64
OMMM0, Host: MacBookAir10,1
.;loddo:' loolloddol;. Kernel: 22.1.0
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 53 mins
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 89 (brew)
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.8.1
;MMMMMMMMMMMMMMMMMMMMMMMM: Resolution: 1440x900
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Blue (Dark)
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk Terminal: iTerm2
.XMMMMMMMMMMMMMMMMMMMMMMMMK. Terminal Font: Monaco 12
kMMMMMMMMMMMMMMMMMMMMMMd CPU: Apple M1
;KMMMMMMMWXXWMMMMMMMk. GPU: Apple M1
.cooc,. .,coo:. Memory: 1129MiB / 8192MiB
➜ ~ vagrant --version
Vagrant 2.3.2
Logs
mkmf.log
gem_make.out.zip

Step 1:
brew install qemu gcc libvirt.
Step 2:
echo 'security_driver = "none"' >> /usr/local/etc/libvirt/qemu.conf
echo "dynamic_ownership = 0" >> /usr/local/etc/libvirt/qemu.conf
echo "remember_owner = 0" >> /usr/local/etc/libvirt/qemu.conf
If that doesn't work for you, try this tutorial together with this one.

Related

Can't install RMagick 2.13.2

I am having an issue on OS X Maverick when trying to install the rmagick gem. Following are some details
ImageMagic details
mairs-MacBook-Pro:social-login-in-rails umair$ convert --version
Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-07-06 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules
Delegates: bzlib freetype jng jpeg ltdl lzma png xml zlib
I tried installing with and without paths but I am unable to install rmagick.
Error on installing rmagick
Umairs-MacBook-Pro:social-login-in-rails umair$ sudo C_INCLUDE_PATH=/opt/ImageMagick/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig/ gem install rmagick
Building native extensions. This could take a while...
/Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/ext/builder.rb:73: warning: Insecure world writable dir /usr in PATH, mode 040777
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/umair/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
Warning: Found more than one ImageMagick installation. This could cause problems at runtime.
/usr/local/bin/Magick-config reports version 6.8.9 Q16 is installed in /usr/local/Cellar/imagemagick/6.8.9-1
/opt/ImageMagick/bin/Magick-config reports version 6.8.8 Q16 is installed in /opt/ImageMagick
Using 6.8.9 Q16 from /usr/local/Cellar/imagemagick/6.8.9-1.
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
/usr/local/bin/Magick-config: line 41: pkg-config: command not found
/usr/local/bin/Magick-config: line 47: pkg-config: command not found
/usr/local/bin/Magick-config: line 50: pkg-config: command not found
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... yes
/usr/local/bin/Magick-config: line 53: pkg-config: command not found
Can't install RMagick 2.13.2. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.
*** 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=/Users/umair/.rvm/rubies/ruby-2.1.0/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/gems/rmagick-2.13.2 for inspection.
Results logged to /Users/umair/.rvm/rubies/ruby-2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/rmagick-2.13.2/gem_make.out
For anyone having issues with this on OSX Sierra with homebrew installing imagemagick version 7+
You need to install version 6 of imagemagick in order for rmagick to work properly. These 3 commands worked for me. Install the version 6 of imagemagick and then force it to link. bundle installing rmagick should work properly afterwards.
$ brew install imagemagick#6
$ brew link imagemagick#6 --force
$ bundle install
You may need to brew uninstall imagemagick before installing and linking to #6.
I had the exact same problem, and running these on the command line fixed it (using mac):
$ brew uninstall pkg-config
$ brew install pkg-config
$ brew unlink pkg-config && brew link pkg-config
For a clean install of imagemagick#6 required for rmagic 2.16 you need to run:
$ brew uninstall imagemagick
$ brew install imagemagick#6 && brew link imagemagic#6 --force
$ brew install pkg-config
Then you yould be able to run bundle install without issues.

How to install ruby-augeas gem? (ubuntu 10.04)

root#ubuntu10:~# gem install ruby-augeas
Fetching: ruby-augeas-0.5.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ruby-augeas:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby 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=/usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby
--with-augeas-config
--without-augeas-config
--with-pkg-config
--without-pkg-config
extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError)
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p327/gems/ruby-augeas-0.5.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p327/gems/ruby-augeas-0.5.0/ext/augeas/gem_make.out
No idea what lib is missing....
root#ubuntu10:~# apt-get install libaugeas-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libaugeas-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 108 not upgraded.
I have also installed the libaugeas-dev lib , it still doesn't work
On Ubuntu 12.04. I fixed it with:
$ sudo apt-get install pkg-config
As per following reply: http://www.redhat.com/archives/augeas-devel/2009-August/msg00061.html
augeas-devel not installed (RuntimeError)
You should install it :
sudo apt-get install libaugeas-dev
You don't need to use gem to install ruby-augeas on Ubuntu, it's packaged, so just use:
sudo apt-get install libaugeas-ruby
If you want up-to-date versions of Augeas and ruby-augeas, you can use my PPA:
sudo apt-add-repository ppa:raphink/augeas
sudo apt-get update
sudo apt-get install libaugeas-ruby
you could try gem install ruby-augeas --pre

Library not found installing RSRuby on OS X 10.7.4

I'm trying to get RSRuby installed on my Mac. After calling:
sudo gem install rsruby
I am getting this error:
ERROR: Cannot find the R library, aborting.
*** 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/xxxxx/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-R-dir
--with-R-include
--without-R-include=${R-dir}/include
--with-R-lib
--without-R-lib=${R-dir}/lib
--with-Rlib
--without-Rlib
I'm working on Mac OS X 10.7.4 and I installed R through the .pkg provided.
Any idea?
For anyone in the same situation just do as follows:
$ R_HOME=/Library/Frameworks/R.framework/Resources
$ gem install rsruby -- --with-R-dir=$R_HOME
I experienced this problem as I had not yet installed R on my mac(Yosemite). I did it using
$ brew tap homebrew/science
$ brew install gcc
$ brew install Caskroom/cask/xquartz
$ brew install r
I'm running OS X 10.9.4 and this worked for me.
export R_HOME=/Library/Frameworks/R.framework/Resources
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_HOME/include --with-R-lib=$R_HOME/lib

Installing Chef Server on Windows

I'm trying to get a Chef Server up and running on a Windows 2008 Server box.
I'm following the process here:
http://wiki.opscode.com/display/chef/Installing+Chef+Server+Manually
I've just installed Gecode and the next step is a ruby command:
gem install chef-server chef-server-api chef-server chef-solr
However, running this command gives the following output suggesting that Gecode isn't installed.
C:\Users\Administrator>gem install chef-server chef-server-api chef-server chef-
solr
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing chef-server:
ERROR: Failed to build gem native extension.
C:/opscode/chef/embedded/bin/ruby.exe extconf.rb
checking for main() in -lgecodesearch... no
================================================================================
=========
Gecode >3.5 must be installed (http://www.gecode.org/).
OSX:
brew install gecode
For convenience, we have built Gecode for Debian/Ubuntu (<release> is lucid or m
averick):
Add the following two lines to /etc/apt/sources.list.d/opscode.list:
deb http://apt.opscode.com <release> main
deb-src http://apt.opscode.com <release> main
Then run:
curl http://apt.opscode.com/packages#opscode.com.gpg.key | sudo apt-key add
-
sudo apt-get update
sudo apt-get install libgecode-dev
Other distributions can build from source.
================================================================================
=========
*** 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=C:/opscode/chef/embedded/bin/ruby
--with-gecodesearchlib
--without-gecodesearchlib
extconf.rb:57:in `<main>': Gecode not installed (RuntimeError)
Gem files will remain installed in C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/
gems/dep_selector-0.0.8 for inspection.
Results logged to C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/dep_selector
-0.0.8/ext/dep_gecode/gem_make.out
Building native extensions. This could take a while...
ERROR: Error installing chef-server-api:
ERROR: Failed to build gem native extension.
C:/opscode/chef/embedded/bin/ruby.exe extconf.rb
checking for main() in -lgecodesearch... no
================================================================================
=========
Gecode >3.5 must be installed (http://www.gecode.org/).
OSX:
brew install gecode
For convenience, we have built Gecode for Debian/Ubuntu (<release> is lucid or m
averick):
Add the following two lines to /etc/apt/sources.list.d/opscode.list:
deb http://apt.opscode.com <release> main
deb-src http://apt.opscode.com <release> main
Then run:
curl http://apt.opscode.com/packages#opscode.com.gpg.key | sudo apt-key add
-
sudo apt-get update
sudo apt-get install libgecode-dev
I installed version 3.7.3 with the default options.
Anyone have an idea how I can proceed? I don't know anything about Ruby or Gecode.
TIA
Chef server is not supported on Windows.

Ruby Error installing rmagick

SO all begins when i wanted to install zena . But i messed up installing differents parts of Ruby , gems , mysql . In the end . I ended with installing zena correctly , but when i execute : rake zena:init as it says in the tutorial , i receve :
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec
*** 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/bin/ruby
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
Building native extensions. This could take a while....
I wish i can delete everything and reinstall ruby and all of it more correctly . Can anyone help me with this ? . Thank you guys !
Are you on ubuntu?
Then try to install the this package:
sudo apt-get install libmagickwand-dev
If this didn't help, try to install these packages:
sudo apt-get install build-essential ruby-dev
The question seems similar to
Can't install RMagick 2.13.1. Can't find MagickWand.h.
Try my answer there.
From the posted log, it seems like it cannot find ImageMagick (which is required) at all.
Try this when you are getting dependency error:
E: Some index files failed to download. They have been ignored, or old ones used instead after apt-get update
Otherwise follow the steps mentioned below:
sudo cp /etc/apt/sources.list ~/
sudo wget "http://pastebin.com/raw.php?i=uzhrtg5M" -O /etc/apt/sources.list
sudo apt-get update
sudo rm /etc/apt/sources.list.d/ubuntu-extras.list
sudo apt-get update

Resources