Jump Start PHP Environment

Hello all,

Am reading, Jump Start PHP Environment, and in chapter 4, “using vagrant”, am running into this error after downloading the github repo.

When running from git-bash terminal:

bin/folderfix.sh
vagrant up

the output:

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

I googled that error and search on the forum but can’t seemed to find an answer. Can you help.

Thanks.

Heber

You can’t run it from the Windows command prompt. You need Git Bash.

Sorry, I meant to say that am using git-bash. Thx.

And you changed directories before the folderfix, yes?

Yes, after I unzipped the file from github repo in my working directory, I cd into the new directory:

cd homestead_improved-master

Once inside the directory above, then I ran:

bin/folderfix.sh

While in the same directory, I ran:

vagrant up

…and this is where the error originated, at least I think so. Thx for your help.

Have you tried

cd ~/homestead_improved-master

I have, but I noticed that after unzipping the file, the homestead_improved-master directory is nested inside another directory with the same name. So, from the directory that I unzipped the repo, I cd into the created directory.

hmisa@hs MINGW64 ~/proj
$ cd ~/homestead_improved-master
bash: cd: /c/Users/hmisa/homestead_improved-master: No such file or directory

hmisa@hs MINGW64 ~/proj
$ cd homestead_improved-master/

hmisa@hs MINGW64 ~/proj/homestead_improved-master
$ bin/folderfix.sh
bash: bin/folderfix.sh: No such file or directory

hmisa@hs MINGW64 ~/proj/homestead_improved-master
$ cd homestead_improved-master/

hmisa@hs MINGW64 ~/proj/homestead_improved-master/homestead_improved-master
$ bin/folderfix.sh

But this works, cd homestead_improved-master. If I cd into the nested folder, am at the root of where the files are for this repo. Is there a difference from cd ~/ to cd?

Then I run vagrant up and get the same error:

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

Thx.

The ~ just ensures your in the (Linux) home directory. In my case, in Windows, this is c:\users\user

Your cd: /c/Users/hmisa/homestead_improved-master looks as though you’re mixing Windows and Linux directory structures.

Try using the dir command to list the contents of each directory to see where things are.

This is what the dir returns (ls returns the same):

hmisa@hs MINGW64 ~/proj
$ dir
homestead_improved-master  test

I have two directories and homestead_improved-master has nested directories. So when cd ~/homestead_improved-master, I get a No such file or directory error. Thus, making me navigate to the directory where the project is located, but resulting in the same error. Sorry if this sounds somewhat repetitive. Thx.

What is the contents of homestead_improved-master ?

Here is the content:

hmisa@hs MINGW64 ~/proj
$ ls
homestead_improved-master/   test/

hmisa@hs MINGW64 ~/proj
$ ls homestead_improved-master/
homestead_improved-master/

hmisa@hs MINGW64 ~/proj
$ ls homestead_improved-master/homestead_improved-master/
after.sh*  bin/           composer.lock  Homestead.yaml  readme.md  src/
aliases    composer.json  homestead*     LICENSE.txt     scripts/   Vagrantfile

It shows the nested directories and its content. Thx.

Ah - how confusing!

It looks as though you need to
cd ~/proj/homestead_improved-master/homestead_improved-master
to run Vagrant then.

I get the same error. I may have to come back to this one and see if I can start this from the beginning. Thx for your help.

Sounds like that might be for the best. :slight_smile:

I’m getting the same error.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.