当我在文件“ Berksfile”中添加食谱时,命令“ Vagrant up”会出现此错误:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Loading Berkshelf datafile...
==> default: Sharing cookbooks with VM
==> default: Updating Vagrant's Berkshelf...
The following berks command failed to execute:
C:\opscode\chefdk\bin\/berks.BAT vendor C:/Users/UserName/.berkshelf/vagrant-berkshelf/shelves/berkshelf20190120-5940-xniqx1-default --berksfile C:/Users/UserName/Vagrant/JleGLocal/Berksfile
The stdout and stderr are shown below:
stdout:
stderr: ArgumentError comparison of Berkshelf::Dependency with Berkshelf::Dependency failed
Vagrantfile内容:
Vagrant.configure("2") do |config|
config.vm.box = "JleGLocal"
config.berkshelf.enabled = true
config.vm.provision :chef_solo do |chef|
chef.add_recipe "apt"
chef.add_recipe "apache2"
end
end
Berksfile内容:
source 'https://supermarket.chef.io'
metadata
cookbook 'apt'
cookbook 'apache2'
这是我对Vagrant的首次体验,我正在尝试一些教程,但它们似乎都已过时(2014年/ 2015年),并且永远无法使用。
预先感谢您的回答。