Estou tentando instalar o compositor usandoum tutorial, no Ubuntu 18.04. Estou tendo a seguinte mensagem de erro:
$ 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.
Obrigado por qualquer ajuda.
Responder1
Excluí /usr/local/bin/composer
e iniciei o processo de instalação desde o início e funcionou agora.
Quando insiro o seguinte comando, recebo a seguinte mensagem de erro:
$ compositor
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
Mas ao usar
$ sudo compositor
Estou acertando tudo da seguinte forma:
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 2.0.12 2021-04-01 10:14:59
Para rodar o compositor sem ser sudom fiz o seguinte:
// Clear cache
composer clearcache
// OR
composer clear-cache
// Completely remove the cache directory
sudo rm -rf ~/.composer