3

I am trying to install Emacs 24.5 on Ubuntu 14.04 by following this guide. I have downloaded Emacs 24.5 package from FTP and proceeded with ./configure which ran ok, but after running make getting this error :

/usr/bin/ld: cannot find -lpng16
collect2: error: ld returned 1 exit status
make[1]: *** [temacs] Error 1

Tried the same with Emacs 24.4, and same issue. How to install the missing dependency?

  • It seems to build fine on my 14.04.3 system using libpng12 - so I guess what you need to figure out is why ./configure appears to think you have libpng16 but make doesn't find it. Have you manually installed any png libraries? – steeldriver Jan 19 '16 at 13:20
  • @steeldriver nope! my kernel is 3.13.0-74-generic – Koustuv Sinha Jan 19 '16 at 14:32
  • What is apt-cache policy libpng12-dev and pkg-config --modversion libpng? – steeldriver Jan 19 '16 at 14:54
  • @steeldriver pastebin.com/jxkqD5Cr – Koustuv Sinha Jan 19 '16 at 17:14
  • in that case I'm out of ideas - sorry – steeldriver Jan 19 '16 at 17:23
2

You just need to install libpng separately. I had the same exact problem occurring both in 24.4 and 24.5, but after installing it, emacs 24.5 installed normally.

To install, unpack and change directory into libpng and :

./configure
make check
make install

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.