0

When I run composer I get this

bash: /opt/cpanel/composer/bin/composer: No such file or directory

I'm trying to find where my bash profile (the file that contains my PATH is. I'm on Centos 6. I run: nano /root/.bashrc and there's no entry in there I run /etc/bashrc same no entry. I've checked online and can't find any answer pointing me to where it would be.

Per comments I've tried: /etc/profile and $HOME/.profile I need to remove that composer path, wherever that file is.

7
  • Are you trying to find where bash is, or where composer is? – Saswat Padhi Sep 13 '19 at 23:46
  • bash so I can remove that line about composer. I need to reinstall it @SaswatPadhi – FabricioG Sep 13 '19 at 23:47
  • Have you tried running which bash on your system? – Saswat Padhi Sep 13 '19 at 23:48
  • I think you mean .bashrc or .profile instead of bash. You can't really "remove a line from bash" ... Check /etc/profile and $HOME/.profile files – Saswat Padhi Sep 13 '19 at 23:50
  • 1
    Also see this answer: unix.stackexchange.com/a/334389/360388 – Saswat Padhi Sep 13 '19 at 23:55
1

Per Saswati in comments. I ran:

echo exit | strace bash -li |& less | grep '^open'

Here I was able to see that cpanel was generating the export here:

open("/etc/profile.d/cpanel-php-composer.sh", O_RDONLY) = 3

I then uncommented it from the above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.