Installing Emacs on Solaris

I tried to install emacs on a Solaris 10 system earlier today and ran into trouble along the way. It wasn’t anything major but I was not able to find the solution on the web so I’m publishing my comments here.

The Problem

I downloaded, unpacked and installed the emacs binaries (version 22.0.91) as well as all specified dependencies from but when I tried to run emacs from the command-line after installling, I got the following error: emacs: fatal: /usr/local/lib/ wrong ELF class: ELFCLASS64

It turns out that the latest version of the libpng library (1.2.21) was built as 64-bit library but all of the other dependencies of emacs that I downloaded (including emacs itself) were built as 32-bit files. Naturally, a 32-bit application cannot load a 64-bit library and thus the error above.

The Solution

The solution was as simple as reverting to an earlier version of the libpng library (1.2.20) which seems to have been built in 32-bit. I was able to download this from

One thought on “Installing Emacs on Solaris”

  1. Subsequent to this posting, I contacted the creator of the version libpng on sunfreeware and he kindly replaced the 64-bit version with a 32-bit version.

    As a result, this is no longer a problem.

    Thanks Steve!

Leave a Reply