Where did you get the
export line from?
First things first: Look into your home folder (e.g. open a Finder window). Is there really a folder called
opt in there? If yes, something's really messed up. If no, your
export command was just wrong, since there's no
$HOME (which is your user's home folder).
/opt is typically at the root level of the file system.
Is there a folder called
/opt? Open a Terminal and enter
ls /opt. Does this directory exist? If yes, then you're probably using another package manager already and should not install Homebrew.
But even then, if
/opt really exists, there shouldn't be
If you really want to install a new version of Git, you can do that with:
- the git-osx-installer, which will install everything to
- through Homebrew with
brew install git, see below, which will install the
git command to
To install Homebrew, you have to follow the instructions. There is no
homebrew command. You also don't have to change your
You just have to copy and paste this to your Terminal:
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
This will install Homebrew, but make it available under the
brew command. So to install MySQL through Homebrew, you'd enter:
brew install mysql