user252652
user252652

Reputation: 179

Error installing mercurial on linux: unable to generate hg.mo

I am trying to install mercurial from source. I tried installing mercurial version 3.5 and 3.6 from here: https://www.mercurial-scm.org/release/

My Linux version: Red Hat Enterprise Linux Server release 5.11 (Tikanga)

and my python version: Python 2.6.5

This is the error I get when I try to built it locally.

make local
python setup.py  \
   build_py -c -d . \
   build_ext  -i \
   build_hgexe  -i \
   build_mo
running build_py
running build_ext
running build_hgexe
running build_mo
generating mercurial/locale/zh_TW/LC_MESSAGES/hg.mo from i18n/zh_TW.po
msgfmt -v -o mercurial/locale/zh_TW/LC_MESSAGES/hg.mo i18n/zh_TW.po -c
usage: msgfmt [ -dv ] [ - ] [ name ... ]
mercurial/locale/zh_TW/LC_MESSAGES/hg.mo: No such file or directory
error: command 'msgfmt' failed with exit status 2
 make: *** [local] Error 1

Upvotes: 0

Views: 51

Answers (1)

John Hascall
John Hascall

Reputation: 9416

Looks like you have a msgfmt in your PATH that isn't the one that the installer expects to find.

Do:

which msgfmt

and if the result isn't /usr/bin/msgfmt that's probably the cause

Upvotes: 1

Related Questions