When I do 'open .profile' in the terminal I have the following:
export PATH=$PATH:/usr/local/git/bin
Now I installed node.js for Mac and it says,
Make sure that /usr/local/bin is in your $PATH.
How can I add /usr/local/bin
to export PATH=$PATH:/usr/local/git/bin
?
Try placing $PATH at the end.
export PATH=/usr/local/git/bin:/usr/local/bin:$PATH
In MAC OS Catalina, this are the steps that worked for me, all the above solutions did help but didn't solve my problem.
To make the edited value of path persists in the next sessions
cd ~/
touch .bash_profile
open .bash_profile
That will open the .bash_profile in editor, write inside the following after adding what you want to the path separating each value by column.
export PATH=$PATH:/usr/local/git/bin:/usr/local/bin:
Save, exit, restart your terminal and enjoy
I've had the same problem with you.
cd to ../etc/ then use ls to make sure your "paths" file is in , vim paths, add "/usr/local/bin" at the end of the file.
I tend to find this neat
sudo mkdir -p /etc/paths.d # was optional in my case
echo /usr/local/git/bin | sudo tee /etc/paths.d/mypath1
Source: Stackoverflow.com