简体   繁体   中英

composer laravel install failed

Package operations: 81 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-ctype (v1.13.1): Loading from cache
  - Installing phpoption/phpoption (1.6.0): Downloading (100%)         

In Cache.php line 134: copy(/home/hadatskywalker007/.cache/composer/files/phpoption/phpoption/860c914d2b2ba245c58c7a77f11b1d79ff4e6cdf.zip): failed to open stream: Permission denied  


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

Run This commands.

composer clearcache

then install composer

composer global require "laravel/installer=~1.1"

The error is saying that composer don't have permission to write to the cache folder.

Either change the permissions of the cache folder:

sudo chmod -R 777 /home/hadatskywalker007/.cache/

or use uso when calling composer:

sudo composer create-project...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM