Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

E: Package 'mercurial' has no installation candidate. How can i solve this problem?

sudo apt-get install mercurial

Reading package lists... Done
Building dependency tree
Reading state information... Done

Package mercurial is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, oris only available from another source

share|improve this question
If possible, please update the question with the content of your /etc/apt/sources.list file. A wild guess might be that you don't have the universe component active. – andol Mar 25 '12 at 13:27
What is your version of ubuntu? Also, sudo gedit /etc/apt/sources.list (as the @andol say) then copy/paste that. – ZDroid Feb 10 '13 at 14:17
@ZDroid gksu gedit (or gksudo gedit, or, on Kubuntu, kdesudo gedit) is preferable because it doesn't create configuration problems for the graphical application being run. – Eliah Kagan Feb 16 '13 at 3:21
Yes Kagan, sorry for my inattention. ;) – ZDroid Feb 16 '13 at 9:03

As andol suggests, this is likely a result of the Universe repository component being disabled. Searching the Ubuntu package database for mercurial reveals it's in Universe.

One way to enable the Universe repository is to press Ctrl+Alt+F2 and run software-properties-gtk. In the Ubuntu Software tab, under Downloadable from the Internet, make sure the checkbox for Community-maintained Open Source software (universe) is checked. For more information on enabling Universe, see:

Then, to install Mercurial, run:

sudo apt-get update && sudo apt-get install mercurial

mercurial Install mercurial can also be installed from the Software Center.

share|improve this answer

Run sudo apt-get update and try again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.