php composer.phar 拋出異常

php composer.phar require --prefer-dist light/yii2-swagger "~1.0.4" --dev
拋出異常以下:php

failed to open stream: Permission denied
https://packagist.phpcomposer.com could not be fully loaded, package information was loaded from the local cache and may be out of dateyii2

解決辦法:composer

sudo chown -R $USER ~/.composer/yii

相關文章
相關標籤/搜索