Installing Mercurial on Mac OS X 10.6
Andrew Mclaughlin
I'm trying to install Mercurial on Mac OSX 10.6, but I'm having problems:
- I have Mac OS X 10.6, so I downloaded Mercurial 1.4.3 for OS X 10.6 from
- I install the downloaded file
mercurial-1.4.3+20100201-py2.6-macosx10.6.mpkg - Than, I open Terminal and run
hg --versionto make sure it's installed. and it says
hg: command not found
How do I install Mercurial on Mac OS X 10.6?
44 Answers
Mercurial installs itself in /usr/local/bin, so the executable you want is /usr/local/bin/hg. You just need to add that directory to your PATH variable, i.e. do something like
export PATH="/usr/local/bin:$PATH"somewhere in your shell profile (.profile, .bashrc, .zshrc).
PS: I only ever used Mercurial once, a week ago, and this particular information is displayed during installation, and again available as part of the package documentation. Not very hard to find :)
3I had to do this:
go download the proper version of mercurial (mac didn't have it)
Make sure you grab the version of your MAc then not only make sure it's in your path like F'x said, but also make sure you have an alias set for it to execute from any directory:
alias hg=/path/where/mercurial/installedfor me it was
/usr/local/bin/hgHope this helps someone. It took me an hour to figure out.
For me, it wasn't the $PATH variable. That was already set to /usr/local/bin. However when I ran sudo su and performed ls -al /usr/local, bin was set only to 700 with "wheel" user. Though, probably not the most secure, I set this to chmod -R 755 /usr/local/bin and then I could run hg --version from any command line (as well as IntelliJ)
You can use the installer from Mercurial Downloads.Donwload the required version from list of Just double click and it will instal mercurial for you