2

I am new to Ubuntu and Mercurial, so I wanted to see if anyone has experience installing Mercurial from source since it does not have an Ubuntu-specific distribution.

What is the best way for me to install Mercurial from source? Any ideas? :)

Thanks, Alex

1
  • In the future, tell us what version of Ubuntu you're using. Commented Mar 22, 2011 at 19:01

3 Answers 3

9

You can install Mercurial from source using pip (apt-get install pip if you don't already have it):

pip install mercurial 

This will usually install it to /usr/local/bin/hg, instead of the default /usr/bin/hg.

If you want to install a specific version, you can always point pip at one of the source releases, such as https://www.mercurial-scm.org/release/mercurial-1.8.1.tar.gz.

Lastly, if you really want to install from source, download one of those source tarballs, unzip it, and run

cd mercurial-1.8.1 python setup.py install 
Sign up to request clarification or add additional context in comments.

2 Comments

I think the command is sudo apt-get install python-pip and NOT sudo apt-get install pip
And this is the command to install source archive file using PIP: pip install /path/to/source.tar.gz or pip install http://example.com/source.tar.gz
4

Yes it does. It's called mercurial. You can do:

sudo apt-get install mercurial 

or use the graphical package manager.

If you need a later version, you can use the PPA. You certainly can build it from source if you want. The easiest way is to use apt-get source, then build the package. If you want to build it from upstream source, that's possible too.

2 Comments

As much as the above will correctly install the mercurial binaries this doesn't really provide the best answer to the actual question. Whereas following these instructions does: help.ubuntu.com/community/Mercurial
Does not install latest version on Ubuntu and the alternative PPA is also out of date.
1

On Ubuntu/Debian: sudo apt-get install mercurial

1 Comment

Does not install latest version on Ubuntu.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.