我正在尝试安装 vagrant。安装后终端命令出现错误。
尝试清理(docs link)并再次安装。
我只安装并尝试从终端运行vagrant
命令。
这就是我得到的。我不知道这意味着什么。
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- vagrant-share/helper/api (LoadError)
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:244:in `<encoded>'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `RGLoader_load'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share/activate.rb:16:in `<top (required)>'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /opt/vagrant/embedded/gems/gems/vagrant-share-1.1.7/lib/vagrant-share.rb:23:in `block in <class:Plugin>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:75:in `block (2 levels) in help'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:49:in `block in each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/registry.rb:48:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:69:in `block in help'
from /opt/vagrant/embedded/lib/ruby/2.2.0/optparse.rb:917:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:57:in `help'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/cli.rb:32:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/lib/vagrant/environment.rb:308:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.4/bin/vagrant:127:in `<main>'
最佳答案
这似乎是您的 vagrant-share
插件的问题(v. 1.1.7)
您可以安装最新版本的插件
$ vagrant plugin install vagrant-share --plugin-version 1.1.8
Installing the 'vagrant-share --version '1.1.8'' plugin. This can take a few minutes...
Fetching: vagrant-share-1.1.8.gem (100%)
Installed the plugin 'vagrant-share (1.1.8)'!
此后应该可以工作
关于macos - OSX 上的 Vagrant LoadError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43977697/