但已安装了vagrant

但已安装了vagrant

本文介绍了Vagrant:未知的配置节“ omnibus”,但已安装了vagrant-omnibus插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装最新的ChefDK之后,我已按照以下说明进行操作:从这里开始:)。当我无所事事时,出现错误:

I've followed the instructions at: http://berkshelf.com/ after installing the latest ChefDK (from here: http://downloads.getchef.com/chef-dk/mac/#/). When I do "vagrant up", I get the error:

Vagrant:
* Unknown configuration section 'omnibus'.

各种帖子(例如)表明这意味着未安装vagrant-omnibus插件。就我而言,我已经安装了它。 无用插件列表显示:

Various posts (e.g. Vagrant Install chef-client on top of base image) have suggested this means that the vagrant-omnibus plugin is not installed. In my case, I have installed it. "vagrant plugin list" displays:

vagrant-berkshelf (2.0.1)
  - Version Constraint: 2.0.1
vagrant-login (1.0.1, system)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.1, system)

关于如何使本示例食谱在无用功启动的新VM实例上运行的任何建议?

Any suggestions as to how I can get this example cookbook to run on a new VM instance launched with "vagrant up"?

推荐答案

对我来说,问题是〜/ .vagrant.d / plugins.json 包括vagrant-omnibus插件,〜/ .vagrant.d / gems / gems 〜/ .vagrant.d / gems / specifications 目录不包含适当的GEM或gemspec文件。不知道这是怎么发生的,但是我怀疑这是由于在执行vagrant plugin install命令的过程中意外键入了 ^ C 而导致的。

It turns out the issue for me was that while ~/.vagrant.d/plugins.json included the vagrant-omnibus plugin, the ~/.vagrant.d/gems/gems and ~/.vagrant.d/gems/specifications directories did not contain the appropriate GEM or gemspec files. Not sure how this happened, but I suspect it was due to accidentally typing ^C in the middle of execution of the vagrant plugin install command and then reexecuting that command.

会出现无用的插件安装并不适合 ^ C 处理,并在存储gem和gemspec之前写入 plugins.json 的内容。

It would appear vagrant plugin install does not do appropriate ^C handling and that it writes the contents of plugins.json before it has stored the gem and gemspec.

后续的无用插件安装命令不能解决问题。手动编辑 plugins.json 删除插件,然后重新执行 vagrant插件安装vagrant-omnibus 命令可解决此问题。

Subsequent vagrant plugin install commands don't fix the problem. Manually editing plugins.json to remove the plugin and then reexecuting the vagrant plugin install vagrant-omnibus command fixed the issue.

这篇关于Vagrant:未知的配置节“ omnibus”,但已安装了vagrant-omnibus插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!