다음을 사용하여 작곡가를 설치하려고합니다.튜토리얼, 우분투 18.04에서. 다음과 같은 오류 메시지가 나타납니다.
$ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
[sudo] password :
All settings correct for using Composer
Downloading...
Could not write to file "/usr/local/bin/composer": rename(/usr/local/bin/composer-temp.phar,/usr/local/bin/composer): Is a directory
Retrying...
Could not write to file "/usr/local/bin/composer": rename(/usr/local/bin/composer-temp.phar,/usr/local/bin/composer): Is a directory
Retrying...
Could not write to file "/usr/local/bin/composer": rename(/usr/local/bin/composer-temp.phar,/usr/local/bin/composer): Is a directory
The download failed repeatedly, aborting.
도움을 주셔서 감사합니다.
답변1
/usr/local/bin/composer
처음부터 설치 프로세스를 삭제 하고 시작했는데 이제 작동했습니다.
다음 명령을 입력하면 다음과 같은 오류 메시지가 나타납니다.
$ 작곡가
In JsonFile.php line 98:
Could not read /home/tonguim/.composer/config.json
file_get_contents(/home/tonguim/.composer/config.json): failed to open stre
am: Permission denied
하지만 사용시
$ sudo 작곡가
나는 다음과 같이 모든 것을 올바르게 얻고 있습니다.
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 2.0.12 2021-04-01 10:14:59
Sudom이 아닌 Composer를 실행하기 위해 다음을 수행했습니다.
// Clear cache
composer clearcache
// OR
composer clear-cache
// Completely remove the cache directory
sudo rm -rf ~/.composer