无论我是否有一个Vagrant文件,或者如果一个不存在,我都使用vagrant init
创建了自己的文件(可以正常工作),尝试执行此操作时会出错:
vagrant up
错误是:
1: from /usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/driver.rb:40:in `connection'
/usr/share/rubygems-integration/all/gems/vagrant-libvirt-0.0.43/lib/vagrant-libvirt/driver.rb:43:in `rescue in connection': Error while connecting to libvirt:
Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/michael/.ssh/id_rsa: (VagrantPlugins::ProviderLibvirt::Errors::FogLibvirtConnectionError)
Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
Error while connecting to libvirt: Error making a connection to libvirt URI qemu:///system?no_verify=1&keyfile=/home/michael/.ssh/id_rsa:
Call to virConnectOpen failed: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
这是在Ubuntu 18.04上
答案 0 :(得分:1)
尝试
vagrant up --provider virtualbox
然后,如果仍然不好。检查流浪汉和virtualbox版本的兼容性
答案 1 :(得分:0)
需要两件事:
对于2(设置提供程序),您可以执行(例如)
sudo apt-get install virtualbox
然后,选择1(从中设置框)
vagrant up --provider virtualbox