我已经更新到了Vagrant 1.4.3,并且正在尝试安装vagrant-berkshelf插件。我得到以下错误:
$ vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/installer.rb:184:in `check_executable_overwrite': "minitar" from minitar conflicts with installed executable from archive-tar-minitar (Gem::InstallError)
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/installer.rb:384:in `block in generate_bin'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/installer.rb:371:in `each'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/installer.rb:371:in `generate_bin'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/installer.rb:231:in `install'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:379:in `block in install'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:339:in `each'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:339:in `each_with_index'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:339:in `install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/action/install_gem.rb:65:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/user_interaction.rb:40:in `use_ui'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/action/install_gem.rb:52:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/command/base.rb:17:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/command/install.rb:27:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/command/root.rb:56:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/cli.rb:38:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/environment.rb:484:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/bin/vagrant:127:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'我尝试在系统和Vagrant专用红宝石上手动安装minitar。系统ruby安装的很好。当我手动将它安装到Vagrant ruby中时,我得到了以下信息:
$ sudo /opt/vagrant/embedded/bin/gem install minitar
Fetching: minitar-0.5.4.gem (100%)
minitar's executable "minitar" conflicts with archive-tar-minitar
Overwrite the executable? [yN] y
Successfully installed minitar-0.5.4
Parsing documentation for minitar-0.5.4
Installing ri documentation for minitar-0.5.4
1 gem installed但是,我仍然得到完全相同的错误。我尝试手动安装Gemfile中的所有gem,都是从vagrant-berkshelf库中下载的,但仍然无法安装。
发布于 2014-01-14 02:37:55
我在https://github.com/berkshelf/vagrant-berkshelf/issues/140中询问,并得到了以下答案。
这与流浪汉-厨师-图书管理员的依赖是冲突的。解决方案是使用以下命令手动安装minitar:
$ /opt/vagrant/embedded/bin/gem install minitar --install-dir ~/.vagrant.d/gems
minitar's executable "minitar" conflicts with archive-tar-minitar
Overwrite the executable? [yN] y
Successfully installed minitar-0.5.4
Parsing documentation for minitar-0.5.4
Installing ri documentation for minitar-0.5.4
1 gem installed我遗漏的一点是install-dir。
发布于 2014-02-03 02:11:35
显然是5天前的Vagrant Berkshelf has been retired。
将厨师和流浪者一起使用,here is a good article。
请注意该页面上的“备注”:
注意:从1月28日(星期二)起,Vagrantfile和vagrant-bershelf插件将停止使用。您可以执行本文中提到的所有操作(vagrant up、vagrant provision等)。本系列的第3部分介绍了Test Kitchen及其.kitchen.yml。考虑跳到第3部分,现在就开始使用Test Kitchen。这篇文章将仅为历史目的而保留。
因此,遵循this link并使用Test Kitchen而不是Vagrant伯克架。我还没有尝试过,但我和你一样--希望让Chef Solo与Vagrant合作。
发布于 2014-07-07 21:21:09
到目前为止,Test Kitchen setup不能做所有的事情,例如多机设置。你可以用一个本地的伯克架安装替换vagrant-berkshelf,并使用vagrant-triggers在"vagrant up“或"vagrant provision”上提供食谱。
我已经写了一个关于它的short blog post。
基本上,它可以归结为:
Vagrant
下面的Vagrantfile代码段将使用vagrant-triggers插件调用本地安装的伯克架:
[:up, :provision].each do |cmd|
config.trigger.before cmd, :stdout => true do
info 'Cleaning cookbook directory'
run "rm -rf #{cookbooks_path}"
info 'Installing cookbook dependencies with berkshelf'
run "berks vendor #{cookbooks_path}"
end
end这将执行Berkshelf在"cookbook“目录中安装所需的食谱,该目录挂载在您的vagrant VM中,默认情况下由Vagrant chef-solo provisioner使用。
https://stackoverflow.com/questions/21096659
复制相似问题