Aptana Studio 3 and libjpeg62

It’s been my experience that every non-trivial install on Linux will at some point present you with an error. Today while setting up a new VM for python/django development, I seemed to have evaded the rule. Everything went swimmingly right through configuring python, git, mysql, django, and installing and testing the MySQL libs. Fortunately, Aptana Studio 3, my current experimental IDE of choice, was about to step in to save the day and uphold the regime of order and predictability.

All you have to do to install Aptana Studio 3 is unzip it some place and then run it. I made a bin directory under my home directory so I wouldn’t have to worry about updates working due to permissions under /usr. I then popped up a terminal, navigated to the Aptana directory, and ran the AptanaStudio3 executable. The first problem was that it wouldn’t run. Bash complained that the command was unknown, even though my working directory was the command’s location. I’m constantly forgetting everything I know about bash and having to relearn it, and have no doubt this was my fault.

Strangely, navigating to the same folder in the… whatever the hell Ubuntu calls its graphical file explorer… and double-clicking the same file I was trying to run from bash worked just fine. This is one of the reasons I love Linux. You never have time to grow complacent. So the program ran and Aptana started up, and I saw the IDE and was thinking “Looks pretty good!” when a dialog popped up containing the following:

Launching Aptana Portal...' has encountered a problem. An internal error has occured. Details: An internal error has occurred. No more handlesNative code library failed to load. (java.lang.UnsatisfiedLinkError: /.../plugins/com.aptana.swt.webkitbrowser.linux.x86_64_1.0.0. 1334860664/os/linux/x86_64/libcefjni.so: libjpeg.so.62:
cannot open shared object file: No such file or directory)

You have to hand it to Linux. The error messages might scare an ordinary user back to his Mac in thirty seconds, but at least they give you some idea what’s going on. I didn’t like the look of this one because it sort of smacked of a dependency problem, and I hate those. It’s very easy to get the wrong versions of libraries installed in Linux when you’re not careful, and I’ve done it more than a few times. In this case, though, the solution was straightforward.

The file libjpeg.so.62 turns out to be part of a library called libjpeg62, and executing …

locate -i libjpeg

… showed that I didn’t have it. The solution was as simple as …

sudo apt-get install libjpeg62

… which command installed the missing libraries, and Aptana started without error. A couple of clicks later I had a quicky tutorial project running on the local development web server, and django was working. So far Aptana looks like a winner, even if it is based on Eclipse, but I’ll have more to say about that in future posts, after I’ve had a chance to get to know it better.