Several projects that I am trying to build from scratch appear to need msgfmt in order to build. They all fail.

However, when I try to run it directly on the command line I get:

$ msgfmt
msgfmt: error while loading shared libraries: libgettextsrc-0.18.1.so: cannot open shared object file: No such file or directory

I have gettext installed, but it seems to be 0.18.3 instead of 0.18.1:

ii gettext amd64 GNU Internationalization utilities ii gettext-base

Ubuntu version is:

lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 14.04.3 LTS

Release: 14.04

Codename: trusty


$ apt-cache policy gettext
   Version table:
    *** 0
   500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
   100 /var/lib/dpkg/status 0
   500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

And then

$ ls -la $(which msgfmt)
-rwxr-xr-x 1 root root 79104 Jul 13 09:14 /opt/bitnami/common/bin/msgfmt
  • ls /usr/bin/msgfmt gives /usr/bin/msgfmt? – A.B. Aug 27 '15 at 19:38
  • Yes, it does. Ah! That sounds suspicious.... Hmm. – Peter K. Aug 27 '15 at 19:53

You have the right gettext package installed, but your PATH is a bit inconvenient and therefore you use the "wrong" msgfmt.

The path /opt/bitnami/common/bin should be after /usr/bin and so on. Place /opt/bitnami/common/bin at the end of your PATH settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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