无法安装无业游民,berkshelf插件(Cannot install vagrant-berksh

2019-10-19 05:23发布

我已经更新到1.4.3流浪汉和我试图安装的无业游民,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>'

我试图用系统和流浪特定两者红宝石手动安装minitar。 系统安装红宝石它就好了。 当我手动安装入流浪红宝石,我有以下几点:

$ 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中从无业游民,berkshelf GitHub库每一个宝石,仍然无法安装。

Answer 1:

我问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

我错过了位是安装目录。



Answer 2:

显然流浪Berkshelf已经退役的5天前。

与流浪使用厨师, 这里是一个很好的文章 。

需要注意的是页面上的“注意”:

注:截至周二,1月28日的Vagrantfile和无业游民,bershelf插件正在退休你可以做测试厨房和.kitchen.yml这篇文章(无业游民了,流浪汉规定等)中提到的一切都覆盖在第3部分本系列。 考虑直接跳到第3部和刚刚开始使用测试厨房了。 本文将只是历史的目的被保留。

所以按照这个链接 ,并使用测试厨房,而不是流浪Berkshelf。 我没有试过,但是我是在同一条船上,你 - 希望得到厨师独奏与流浪者的工作。



Answer 3:

截至目前,该测试厨房设置不能做的一切如多机设置。 您可以与当地Berkshelf安装和使用无业游民,触发器做食谱vendoring的“流浪者”或“无业游民规定”代替流浪汉,berkshelf。

我写了一个简短的博客文章了。

基本上它归结为:

  • 安装Ruby / Berkshelf
  • 安装流浪汉,触发流浪插件
  • 使用流浪汉触发到供应商的食谱在一个目录
  • 运行流浪厨师独奏供应者

下面Vagrantfile片段将采用流浪汉的触发插件调用本地安装Berkshelf:

  [: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在“食谱”目录,这是安装在您的游民VM和默认由流浪厨师独奏供应者用来安装所需的食谱。



文章来源: Cannot install vagrant-berkshelf plugin