Question

I want to install Mercurial on my Ubuntu server system, but I don't want X (this is a pure console system, no GUI at all). If I use apt-get install mercurial all the X libraries are pulled in. I know I can ignore them but I want to keep my system minimal - is there a way of installing hg without any GUI tools?

Was it helpful?

Solution

X is pulled in due to Wish (Tcl/Tk shell).

We can use: $ sudo apt-get --no-install-recommends install mercurial

Source: https://askubuntu.com/questions/458614/why-does-package-mercurial-depend-on-x11-common-in-a-chrooted-environment

OTHER TIPS

You can always install it manually, behind the back of the package manager, without installing the dependency on X. The command-line portion of Mercurial doesn't depend on much of anything, beyond a working Python install of a recent 2.x vintage (say, 2.7).

FYI, to see what the latest released version is, visit https://www.mercurial-scm.org/downloads.

The version there now is "mercurial-3.0-rc". The "rc" is a "release candidate", which might be too bleeding-edge for you. You can browse the list of all releases at: https://www.mercurial-scm.org/release/. At the time of this writing, the most recent release is Mercurial 2.9.2. So I'll show you how to install that.

Steps to install:

First, download the "source release" of Mercurial 2.9.2 with this curl command:

curl -C - -O https://www.mercurial-scm.org/release/mercurial-2.9.2.tar.gz

Untar with this command:

tar -xzf mercurial-2.9.2.tar.gz

Build & install with these commands:

cd mercurial-2.9.2
sudo python setup.py install

You're done! Verify that it is installed:

which hg
hg --version
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top