smmm@smmm-linux:/var/www/html$ composer create-project laravel/laravel test
Cannot create cache directory /home/smmm/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/smmm/.composer/cache/files/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/smmm/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
答案1
根据您的路径,即接下来的路径/home/smmm/.composer/cache/repo/https---packagist.org
,您必须尝试这些命令来解决您的问题。
- 更改文件夹的组权限
sudo chown -R smmm /home/smmm/.composer/cache/repo/https---packagist.org - 更改文件夹
sudo chown -R smmm /home/smmm/.composer/cache/files/ - 然后为整个作曲家的目录更改权限
sudo chown -R smmm /home/smmm/.composer
此致