无法设置Vagrant

时间:2015-02-22 18:41:07

标签: django vagrant

我一直试图设置Vagrant来学习Django一段时间了。我正在关注[http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/][1]教程。第一个错误是default: stdin is not a tty  第二个是

==> default: ERROR:  Error installing chef:
==> default:    mixlib-shellout requires Ruby version >= 1.9.3.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

我使用Ubuntu 14.04 LTS x86_64作为主机。

sudo apt-get install ruby​​给了我"已经是最新版本"。尝试手动安装厨师。没有运气:(

1 个答案:

答案 0 :(得分:0)

我有一个非常类似的问题(Vagrant,Django),我通过降级Chef解决了这个问题。由于某些版本不匹配,我不得不固定一些宝石。这并没有解决我的所有问题,但它确实用mixlib-shellout解决了OP的错误。

在我的Vagrant文​​件中 # Install an older version of chef config.vm.provision :shell, :inline => 'apt-get install build-essential ruby1.9.1-dev --no-upgrade --yes' config.vm.provision :shell, :inline => "gem install mixlib-shellout --version 1.4.0 --no-rdoc --no-ri --conservative" config.vm.provision :shell, :inline => "gem install ohai --version 7.4 --no-rdoc --no-ri --conservative" config.vm.provision :shell, :inline => "gem install chef --version 11.18.12 --no-rdoc --no-ri --conservative"

更多信息。 https://www.chef.io/blog/2014/12/02/postmortem-ohai-mixlib-shellout-gem-release-issues/