我正在学习http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/的一个视频教程
我正在win7上工作,并在我的终端上使用git-bash。我已经安装了最新的virtualbox - 4.2.12和最新的vagrant - 1.22。
我试着去找流浪汉然后得到了:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 8000 => 8888 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] -- /tmp/vagrant-chef-1/chef-solo-2/cookbooks
[default] Running provisioner: shell...
[default] Running: inline script
stdin: is not a tty
ERROR: Error installing chef:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
creating Makefile
make
sh: 1: make: not found
Gem files will remain installed in /var/lib/gems/1.8/gems/yajl-ruby-1.1.0 for in
spection.
Results logged to /var/lib/gems/1.8/gems/yajl-ruby-1.1.0/ext/yajl/gem_make.out
Building native extensions. This could take a while...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell当我这样做的时候:
$ which make我得到了:
/c/opscode/chef/embedded/bin/make所以看起来make在filepath中
我该如何解决这个问题呢?
附录:当我将漫游文件编辑为:
config.vm.provision :shell,:inline => "curl -L https://opscode.com/chef/install.sh | bash“
我得到了:
/tmp/vagrant-shell: line 1: curl: command not found发布于 2013-06-16 00:45:56
您正在使用的basebox默认情况下没有安装"build-essential“包,它有一个"shell provisioner”,可以将Chef gem安装到默认的Ruby环境中。Chef依赖于JSON RubyGem,而JSON本身具有必须编译的C扩展。这就是我们要找的make。
要解决这个问题,我建议使用Opscode的“综合”full stack installer for Chef。这可以通过将shell provisioner行更改为:
config.vm.provision :shell, :inline => "curl -L https://opscode.com/chef/install.sh | bash"或者,如果你的basebox没有curl,使用wget:
config.vm.provision :shell, :inline => "wget -O https://opscode.com/chef/install.sh | bash"[install.sh][3]脚本只需检查VM以确定其平台,以便它可以从S3存储桶中检索适当的[install.sh][3]。如果您愿意,可以使用构造的URL直接下载.deb文件:
然后安装它:
dpkg -i chef_11.4.4-2.ubuntu.11.04_amd64.deb请参阅shell provisioners上的Vagrant文档,了解如何将其编写为一个小脚本。
发布于 2013-06-15 12:17:33
您是在哪台机器上运行which make的?(主机/来宾)。确保guest(virtualbox)有一个make。
https://github.com/scottmuc/vagrant-postgresql/issues/1#issuecomment-7798110
发布于 2013-06-15 16:53:36
如果操作系统没有预装make,而你仍然想继续前进,你可以这样做:
e = package "make" do
action :nothing
end
e.run_action(:install)它将在编译时安装make包,在您的任何食谱尝试使用它之前。你应该把它放在你的食谱中,最好放在最上面,这样其他读者就能清楚地知道发生了什么。
https://stackoverflow.com/questions/17119003
复制相似问题