Vagrant up 因 Laravel 失败:“SSH 命令以非零退出状态响应”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25771919/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Vagrant up fails with Laravel: 'The SSH command responded with a non-zero exit status'
提问by i_love_nachos
New to Laravel and Vagrant, never put up a virtual machine any way other than via MAMP. New to using Terminal in general.
Laravel 和 Vagrant 的新手,除了通过 MAMP 之外,永远不要以任何方式安装虚拟机。一般使用终端的新手。
Running on Mac OSX 10.9. Vagrantfile (and hopefully soon Laravel) is placed in a folder in Documents.
在 Mac OSX 10.9 上运行。Vagrantfile(希望很快还有 Laravel)被放置在 Documents 的文件夹中。
Receiving error:
接收错误:
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.
UPDATE: When accessing the designated VM address through my browser, I am greeted by a 403 Forbidden
更新:通过我的浏览器访问指定的 VM 地址时,我看到一个 403 Forbidden
EDIT: Link to terminal log updated after fixing laravel installation issues regarding mcrypt.
编辑:在修复有关 mcrypt 的 laravel 安装问题后更新了指向终端日志的链接。
UPDATE: Tried solution described hereby adding the following to /etc/sudoers
. Problem not fixed.
更新:尝试的解决方案描述这里通过添加以下到/etc/sudoers
。问题没有解决。
vagrant ALL=(ALL) NOPASSWD:ALL
Defaults:vagrant !requiretty
回答by mz3
The artisan file isn't there.
工匠文件不在那里。
php artisan migrate #fails
I can't tell exactly what should be in /var/www, but it seems to me like Laravel isn't getting set up properly. Try vagrant ssh
to snoop around in /var/www (ls /var/www) and see what's there/what's missing.
我不能确切地告诉 /var/www 应该是什么,但在我看来 Laravel 没有正确设置。尝试vagrant ssh
在 /var/www (ls /var/www) 中窥探一下,看看那里有什么/缺少什么。
回答by wedojava
run:
跑:
vagrant ssh
when you success login, run the command like below:
登录成功后,运行如下命令:
sudo rm -f /etc/udev/rules.d/70-persistent-net.rules
maybe 70
or 60
is the begining of rules filename.
也许70
或者60
是规则文件名的开头。
than reload your virtualbox,try it maybe the right way to solve the matter.
与其重新加载您的虚拟机,不如尝试一下解决问题的正确方法。
回答by GBMan
If you have this error, after
如果你有这个错误,在
vagrant up
you can use
您可以使用
vagrant ssh
It let you launch your server.
它让你启动你的服务器。