zfcampus / zf-apigility-skeleton

BSD 3-Clause "New" or "Revised" License
445 stars 123 forks source link

composer install on Vagrant box fails #169

Open MECU opened 5 years ago

MECU commented 5 years ago

I just did a new install and at the end it says to run: vagrant ssh -c 'composer install', so I did and got:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update

  [ErrorException]                                                                                      
  file_put_contents(/var/www/vendor/composer/installed.json): failed to open stream: Permission denied  

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

Connection to 127.0.0.1 closed.

So I tried to vagrant ssh and run composer install and got the same result.

So I sudo vagrant ssh and it works (with nothing to do), though with the composer warning to not run as root.

It seems the ssh is using user vagrant but the /var/www is setup with www-data user and group so the vagrant user doesn't have permission.


I'm not sure if it's related, but I just noticed this error in the vagrant up output:

default: dpkg-preconfigure: unable to re-open stdin: No such file or directory

weierophinney commented 4 years ago

This repository has been closed and moved to laminas-api-tools/api-tools-skeleton; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-skeleton/issues/2.