Trouble setting up Vagrant

耗尽温柔 提交于 2020-01-23 03:15:47

问题


I've been trying to setup Vagrant to learn Django for a while now. I am following [http://gettingstartedwithdjango.com/en/lessons/introduction-and-launch/][1] tutorial. The first error is default: stdin is not a tty and the second is

==> 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.

I am using Ubuntu 14.04 LTS x86_64 as host machine.

sudo apt-get install ruby gives me "Already in the newest version". Tried installing chef manually. No luck either :(


回答1:


I had a very similar issue (Vagrant, Django) which I solved by downgrading Chef. I had to pin a couple of gems too due to some version mismatches. This didn't solve all my issues but it did solve the OP's error with mixlib-shellout.

In my Vagrant file # 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"

More here. https://www.chef.io/blog/2014/12/02/postmortem-ohai-mixlib-shellout-gem-release-issues/



来源:https://stackoverflow.com/questions/28661711/trouble-setting-up-vagrant

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!