作曲家laravel安装失败

时间:2019-12-09 23:56:59

标签: php laravel composer-php

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>]

2 个答案:

答案 0 :(得分:0)

运行此命令。

composer clearcache

然后安装作曲家

composer global require "laravel/installer=~1.1"

答案 1 :(得分:0)

该错误表明作曲者无权写入缓存文件夹。

更改缓存文件夹的权限:

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

或在调用作曲家时使用uso:

sudo composer create-project...