When I am trying to self-update my composer, I get "Permission Denied" error.
Even when I use sudo /usr/bin/composer.phar self-update
, it shows me command not found
.
Please help me I have no idea about composer
When I am trying to self-update my composer, I get "Permission Denied" error.
Even when I use sudo /usr/bin/composer.phar self-update
, it shows me command not found
.
Please help me I have no idea about composer
Try following command:
sudo php /usr/bin/composer.phar self-update
Make sure composer.phar file exist in "/usr/bin"
CentOS7
sudo /usr/local/bin/composer self-update
On the official Composer website (getcomposer.org) in the section headed "self-update", the maintainers give the following information:
If you have installed Composer for your entire system (see global installation), you may have to run the command with root privileges
sudo -H composer self-update
If Composer was not installed as a PHAR, this command is not available. (This is sometimes the case when Composer was installed by an operating system package manager.)
sudo -H
?from man sudo
:
-H, --set-home
Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database entry. Depending on the policy, this may be the default behavior.
© 2022 - 2024 — McMap. All rights reserved.
php composer.phar selfupdate
– Milestonesu: Sorry
– CaineCould not open input file: composer.pharv
– Cainepharv
you have an extra v.. from pasting? – Uprearsudo: /usr/local/bin/composer.phar: command not found
problem sry typing error just now – Caine-vvv
to the command to get full verbose debugging output. Without that it's just a guessing game. – Susceptiblesudo -H composer self-update
fix my bug – Cainesudo /usr/local/bin/composer self-update
– Mcnally