如何在Ubuntu 14.04上安装vagrant-libvirt插件

时间:2017-02-14 08:17:43

标签: ruby vagrant ubuntu-14.04 libvirt

当我跑步时

virtual methods

在Ubuntu 14.04上我收到以下错误消息:

$ vagrant plugin install vagrant-libvirt

此错误消息中的版本号有点误导,因为我通过ppa:brightbox/ruby-ng安装了ruby 2.3.3

Installing the 'vagrant-libvirt' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing rack (2.0.1), and Bundler cannot continue.
Make sure that `gem install rack -v '2.0.1'` succeeds before bundling.

Gem::InstallError: rack requires Ruby version >= 2.2.2.

由于权限不足,从错误消息运行gem命令失败:

$ ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux-gnu]

作为超级用户,它可以正常工作:

gem install rack -v '2.0.1' 
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.3.0 directory.

您运行$ sudo gem install rack -v '2.0.1' Successfully installed rack-2.0.1 Parsing documentation for rack-2.0.1 Done installing documentation for rack after 1 seconds 1 gem installed 仍然失败并显示相同的错误消息。

这里发生了什么?怎么能让这个工作?

0 个答案:

没有答案