Last active
April 13, 2021 18:00
-
-
Save j883376/d90933620c7ed14daa4e0963e005377f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# in case it's already installled | |
vagrant plugin uninstall vagrant-libvirt | |
# vagrant's copy of curl prevents the proper installation of ruby-libvirt | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so{,.backup} | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4{,.backup} | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4.4.0{,.backup} | |
sudo mv /opt/vagrant/embedded/lib/pkgconfig/libcurl.pc{,.backup} | |
CONFIGURE_ARGS="with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib" vagrant plugin install vagrant-libvirt | |
# https://github.com/pradels/vagrant-libvirt/issues/541 | |
export PATH=/opt/vagrant/embedded/bin:$PATH | |
export GEM_HOME=~/.vagrant.d/gems/2.3.4 | |
export GEM_PATH=$GEM_HOME:/opt/vagrant/embedded/gems | |
gem uninstall ruby-libvirt | |
gem install ruby-libvirt | |
# put vagrant's copy of curl back | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so{.backup,} | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4{.backup,} | |
sudo mv /opt/vagrant/embedded/lib/libcurl.so.4.4.0{.backup,} | |
sudo mv /opt/vagrant/embedded/lib/pkgconfig/libcurl.pc{.backup,} |
Thanks! I had to run this two times since I didn't have ruby-libvirt gem installed, but it worked in the end.
Thanks ;)
As of the vagrant-2.0.1-1, this is no longer needed. I was able to just to a vagrant plugin install vagrant-libvirt
and have it just work. 😄
Can confirm what @kshlm is saying.
For vagrant
>= 2.0.1-1
the vagrant
package replaces the vagrant-substrate
, so vagrant-substrate
isn't used anymore.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of the package updates released a couple of days ago, the Ruby version has changed to
2.3.4
. I've updated the Gist to point to the new directory to installruby-libvirt
to this directory. This fixes the following error after you've upgraded your packages.If you have added
vagrant-substrate
to yourIgnorePkg
list, remove it from the list and upgrade all Vagrant related packages, then rerun the latest version of this script.