Vagrant up fails with Laravel: 'The SSH command responded with a non-zero exit status'

17,386

Solution 1

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.

Solution 2

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.

than reload your virtualbox,try it maybe the right way to solve the matter.

Share:
17,386
i_love_nachos
Author by

i_love_nachos

Updated on June 16, 2022

Comments

  • i_love_nachos
    i_love_nachos almost 2 years

    New to Laravel and Vagrant, never put up a virtual machine any way other than via MAMP. New to using Terminal in general.

    Running on Mac OSX 10.9. Vagrantfile (and hopefully soon Laravel) is placed in a folder in 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.
    

    Log since 'vagrant up'

    Used vagrant files

    UPDATE: When accessing the designated VM address through my browser, I am greeted by a 403 Forbidden

    EDIT: Link to terminal log updated after fixing laravel installation issues regarding mcrypt.

    UPDATE: Tried solution described here by adding the following to /etc/sudoers. Problem not fixed.

    vagrant ALL=(ALL) NOPASSWD:ALL
    Defaults:vagrant !requiretty
    
  • i_love_nachos
    i_love_nachos over 9 years
    An update is offered when running it, but when trying to update by do-release-upgrade, it displays This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover. . Should i run the update?
  • i_love_nachos
    i_love_nachos over 9 years
    Also, what do I want to do after running vagrant ssh?
  • mz3
    mz3 over 9 years
    Forget the upgrade for now. After you login with vagrant ssh, try ls /var/www to see the directory listing and make sure the laravel files (specifically artisan) are there.
  • i_love_nachos
    i_love_nachos over 9 years
    this only returns html. what's happening?
  • mz3
    mz3 over 9 years
    I think you need to get a better understanding of your bootstrap script. Laravel isn't getting installed where you expect and without a copy of the project it's difficult to say why.
  • i_love_nachos
    i_love_nachos over 9 years
    I went ahead and started using MAMP for developing on Laravel instead. Not the best solution, I know. I will return to attempting to set Laravel up on Vagrant another day. Upvote for your attention.