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


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.


Run sudo apt-get update and try again.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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