Hello
Since the 1.0.0 image, when i provision the vm the script try to start php-fpm7.0 but it doesn't exist because now it's php-fpm7.1
==> homstead: Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
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.
vagrant@homstead:~$ sudo su -
root@homstead:~# /etc/init.d/php7.1-fpm start
[ ok ] Starting php7.1-fpm (via systemctl): php7.1-fpm.service.
You need to update your homestead repo to version 4.0 (or master)
--
On Dec 9, 2016, 07:40 -0600, makz27 notifications@github.com, wrote:
>
Hello
Since the 1.0.0 image, when i provision the vm the script try to start php-fpm7.0 but it doesn't exist because now it's php-fpm7.1
==> homstead: Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
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.vagrant@homstead:$ sudo su -
root@homstead:# /etc/init.d/php7.1-fpm start
[ ok ] Starting php7.1-fpm (via systemctl): php7.1-fpm.service.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (https://github.com/laravel/homestead/issues/392), or mute the thread (https://github.com/notifications/unsubscribe-auth/AA7Cwnuh7eFIOhHyffP3BW7kYegX7cyRks5rGVpfgaJpZM4LI8ri).
Ok, i tough it was updated because i ran a composer update, homestead was upgraded to 3.1.0, when i tried to up my vagrant box it failed because "a newer version of the box is available" -> box update and it finished with this error.
I forced the homestead update to 4.0.0 it worked, thank you.
If you're using Homestead per project or have homestead in a global composer.json You'll want to make sure you have it set to "^4.0"
@svpernova09 apparently if we aren't quite ready to adopt PHP 7.1 we can use v3.1.0 of laravel/homestead, but this seems to cause the same kind of error:
app: Running: script: Restarting Nginx
==> app: Failed to restart php7.0-fpm.service: Unit php7.0-fpm.service not found.
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.
Do you have any suggestions? I've followed that post's instructions for a per project installation.
Hi @mtpultz
You'll need to lock the version of the box down to a previous version by adding
version: 0.6.0
To your Homestead.yaml This will use the older .box file.
For example:
ip: "192.168.10.10"
memory: 2048
cpus: 1
hostname: homestead
name: homestead
provider: virtualbox
version: 0.6.0
~snip~
Thanks @svpernova09, not sure I understand bumping down to 0.6.0 since I've been running homestead box 1.0.0 with laravel/homestead v3.0.0 since v1.0.0 was released. Does that mean I didn't do something after running vagrant update box, and I've really been running 0.6.0 since the release and download of 1.0.0?
Box 1.0.0 & 1.0.1 are both PHP 7.1. 0.6.0 Was the last version with PHP 7.0.
Man, I must have lost almost 5 hours to get this running again... this post was the last one which helped me... thank god, it's finally working. Bullshit, I've updated every single fucking thing! Homestead, box, VirtualBox, composer, composer dependencies, Vagrantfile, Homestead.yaml. Seriously, I hate this all!! Perdon! I'm just fucking angry with all this. But thanks, it got worked now. Thank you guys...
I tried above and nothing worked and was getting error:
homestead-7: Failed to restart php7.2-fpm.service: Unit php7.2-fpm.service not found.
After a little digging..
There is an issue in the [homestead-install]/scripts/homestead.rb script that does not validate if the script exists prior to adding it to the execution stack. It blindly adds it.
If you edit that file and remove for the version of php that does not exist for you.
Verfiy in linux if not installed by:
ls /usr/bin/php*
and you don't see that version installed it is complaining about (i.e. php7.2-fpm)
Then if you edit the file scripts/homestead.rb and remove the references, it will proceed and complete the data creation scripts, which is where it fails before running them.
You see the blind assignment for example ~line 231:
s.inline = "sudo service nginx restart; sudo service php5.6-fpm restart; sudo service php7.0-fpm restart; sudo service php7.1-fpm restart; sudo service php7.2-fpm restart;"
In my case it is 7.2, so I removed it to look like:
s.inline = "sudo service nginx restart; sudo service php5.6-fpm restart; sudo service php7.0-fpm restart; sudo service php7.1-fpm restart"
and again at ~line 330:
s.inline = "service php5.6-fpm restart; service php7.0-fpm restart; service php7.1-fpm restart;service php7.2-fpm restart;"
to look like:
s.inline = "service php5.6-fpm restart; service php7.0-fpm restart; service php7.1-fpm restart;"
It will not die for the false reference and you should be able to continue your work, without wasting hours/days trying to look for a solution, when perhaps in a work panic.
@dPhantum
Don't edit those files. Either your repo is newer than your base box, or vice versa. Update both, destroy the box, and the problems will go away.
Yeah, I know the deal...
The real deal is, that one should never make blind inclusions like that without verifying the files exists.
The source needs to be fixed.
Most helpful comment
If you're using Homestead per project or have homestead in a global composer.json You'll want to make sure you have it set to "^4.0"