I'm having trouble building Git from sources on an ARM dev-board running Armbian. Armbian is a Ubuntu Bionic derivative. Git fails at the make test recipe.

make[1]: Leaving directory '/home/build/git-2.21.0/templates'
mkdir -p po/build/locale/pt_PT/LC_MESSAGES/ && msgfmt --check --statistics -o po/build/locale/pt_PT/LC_MESSAGES/git.mo po/pt_PT.po
/bin/sh: 1: msgfmt: not found
Makefile:2533: recipe for target 'po/build/locale/pt_PT/LC_MESSAGES/git.mo' failed
make: *** [po/build/locale/pt_PT/LC_MESSAGES/git.mo] Error 127


$ apt-cache search msgfmt
libdist-zilla-plugin-localemsgfmt-perl - Dist::Zilla plugin to compile PO files with Locale::Msgfmt
liblocale-msgfmt-perl - pure Perl reimplementation of msgfmt


$ apt-cache policy liblocale-msgfmt-perl
  Installed: 0.15-1
  Candidate: 0.15-1


$ command -v msgfmt

hash -r does not clear the problem. The problem does not exist on other machines I have, including Ubuntu and Fedora machines.

What is the problem and how do I fix it?


1 Answer 1

$ apt-file search bin/msgfmt
gettext: /usr/bin/msgfmt
$ sudo apt install gettext

msgfmt is part of gettext.

dpkg -L liblocale-msgfmt-perl

will show you that liblocale-msgfmt-perl doesn’t provide a msgfmt command (which does make its description misleading).

apt-cache search msgfmt

doesn’t find gettext because the gettext package’s description doesn’t mention it:

Description: GNU Internationalization utilities
 Interesting for authors or maintainers of other packages or programs
 which they want to see internationalized.

You must log in to answer this question.