Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

snetty's avatar

Spark Installation Errors

I get a couple of errors when I try to install Spark (from within Homestead).

Firstly, as soon as I run spark install whatever I get Could not open input file: composer.phar but the installation seemingly proceeding as normal, can anyone confirm whether that's the case?

Finally, the biggest problem is towards the end of the installation, when I get

Updating Environment File: ✔
  [ErrorException]
  file_get_contents(/Sites/testingspark/.env): failed to open stream: No such file or directory

I can see in the composer.json file that the post-root-package-install is set to copy the .env.example to .env ("php -r \"copy('.env.example', '.env');\""), and I've run that code manually to confirm there are no issues.

Any ideas?

0 likes
6 replies
Giesen's avatar

Same problem over here. You found a solution?

snetty's avatar

I create it manually whilst the spark install is running, not a great method but it works v0v

jgravois's avatar

I was having the same install issue until I added composer to my $PATH explicitly and now Spark installs without a squack

export PATH=$PATH:/usr/local/bin/spark-installer:~/.composer/vendor/bin/
marncz's avatar

Updating composer helped me with this issue.

jjudge's avatar

I noticed on a recent install that Spark uses some OS tools such as make and a few other less common ones. I needed to manually install them on my server before it would install. This is just one of many dependencies that the install process does not check at the start, but ploughs on through partially installing, and can be very easy to miss in masses of log entries.

Cronix's avatar

Try installing using composer instead of the spark-installer. You need to add the satis spark repo to your composer.json, but that's covered in the installation guide.

Please or to participate in this conversation.