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
此致