我需要一个综合构建器盒来构建 python cli 包。
我想使用这本食谱, 在这个 vagrantbox
我以 root 身份运行此程序,因为综合安装程序需要使用 /opt 中的数据进行检查
我的 vagrantfile 如下所示:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos65opscode"
# config.vm.provision "chef_solo" do |chef|
# chef.add_recipe "omnibus"
# end
config.librarian_chef.cheffile_dir = "chef"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "chef/cookbooks"
chef.add_recipe "omnibus"
end
end
由于 vagrant 的 Librarian chef 插件似乎没有执行任何操作,因此我手动添加了所有依赖项:
我收到此错误:
==> default: NameError
==> default: ---------
==> default: uninitialized constant Chef::Sugar::DSL
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:31:in `<module:Helper>'
==> default: /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:30:in `<module:Languages>'
==> default: /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:29:in `<top (required)>'
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/745d120a7b8f9ecb5d8e9f185062c794/cookbooks/languages/libraries/_helper.rb:
==> default:
==> default: 24: rescue LoadError
==> default: 25: Chef::Log.warn 'chef-sugar gem could not be loaded.'
==> default: 26: end
==> default: 27:
==> default: 28: # Various code vendored from omnibus cookbook
==> default: 29: module Languages
==> default: 30: module Helper
==> default: 31>> include Chef::Sugar::DSL if Chef.const_defined?('Sugar')
==> default: 32:
==> default: 33: #
==> default: 34: # Performs a `File.join` but ensures all forward slashes are replaced
==> default: 35: # by backward slashes.
==> default: 36: #
==> default: 37: # @return [String]
==> default: 38: #
==> default: 39: def windows_safe_path_join(*args)
==> default: 40: ::File.join(args).gsub(::File::SEPARATOR, ::File::ALT_SEPARATOR)