Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I've downloaded the source and tried to install via the README instructions:

sudo make install

but I get the following errors:

python setup.py  build
running build
running build_mo
warning: hgbuildmo: could not find msgfmt executable, no translations will be built
running build_py
running build_ext
building 'mercurial.base85' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c mercurial/base85.c -o build/temp.linux-x86_64-2.6/mercurial/base85.o
mercurial/base85.c:12:20: error: Python.h: No such file or directory
mercurial/base85.c: In function ‘b85prep’:
mercurial/base85.c:23: warning: implicit declaration of function ‘memset’
mercurial/base85.c:23: warning: incompatible implicit declaration of built-in function ‘memset’
mercurial/base85.c: At top level:
mercurial/base85.c:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
mercurial/base85.c:76: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
mercurial/base85.c:147: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘methods’
mercurial/base85.c:156: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initbase85’
error: command 'gcc' failed with exit status 1
make: *** [build] Error 1

Keep in mind that I know I can install using:

sudo apt-get install mercurial

but that gets me an older version (1.4.3-1).

So, what's going on?

share|improve this question
up vote 4 down vote accepted

From the line:

mercurial/base85.c:12:20: error: Python.h: No such file or directory

it seems that you don't have the development tools for python. Solve with:

sudo apt-get install python-dev
share|improve this answer

You don't have to build Mercurial by hand to get the newest version on Ubuntu. There is a PPA repository at https://launchpad.net/~mercurial-ppa/+archive/releases

sudo add-apt-repository ppa:mercurial-ppa/releases
sudo apt-get update
sudo apt-get install mercurial

By the way. There is also a PPA for TortoiseHG which offers a nice integration of Mercurial functionality in Nautilus: https://launchpad.net/~tortoisehg-ppa/+archive/releases

sudo add-apt-repository ppa:tortoisehg-ppa/releases
sudo apt-get update
sudo apt-get install tortoisehg-nautilus
share|improve this answer
    
Thanks. That's good to know. – gvkv Jul 2 '10 at 23:12

You need to install gettext for msgfmt:

apt-get install gettext
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .