5
I have an administrator account on my OS X Lion 10.7.2. I have installed a few applications through this account, but I am not able to run them without sudo. For example, I installed git and I cannot just simply run git
from the terminal as I get
-bash: git: command not found
Instead I need to run sudo git
.
I have similar issues with other applications. Another one that is not working is MacFusion.app that tries to use /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static
. I tried running sshfs-static
from the terminal, but once again I had to sudo to make it work.
Any suggestions?
I used git-osx-installer that I downloaded from http://code.google.com/p/git-osx-installer/downloads/list?can=3 . I checked my PATH and /usr/local/git/bin is in it.
– liutikas – 2012-03-20T13:14:06.467I checked my path without
sudo
. I didecho $PATH
– liutikas – 2012-03-20T13:22:26.910Add
PATH=/usr/local/git/bin:$PATH
to your~/.bash_profile
and check that thegit
binary file has correct permissions (execute set). – slhck – 2012-03-20T13:26:11.357I just found out that I cannot even
ls /usr/local
without sudo. How do I fix that? All the directories there have been set toroot
as user andwheel
as group. – liutikas – 2012-03-20T13:31:26.320Then try
sudo chown -R $(whoami) /usr/local
. It's not a system folder anyway, so it's better to keep it owned by you. – slhck – 2012-03-20T13:34:39.890That solved everything. Who are usually default owner and group for /usr/local ? – liutikas – 2012-03-20T13:38:07.217