0
votes

I have recently updated git and it has changed my path to

/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git I try to use composer and execute files and I get the error

env: php: No such file or directory. when

I reset the path back to

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" everything works fine and composer loads but the only thing is it automatically sets the path back to /usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git in a matter of seconds after me doing what I need to do.

i thought the path would stay and go back to the original one i reset it to but it auto reverts back to the git one Is there any way i can fix this without having to reinstall the operating system? and keep the path as PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" i have been stuck on this for two days i just want rid of git

2

2 Answers

0
votes

you should update your .bash_profile file

you can check this guide for futher details

0
votes

@funkyjelly thanks but this was still no good ended up having to reinstall the operating system and install git via home brew and the problem with the path was solved