Installing Aptana Milestone 7 on Linux

From Aptana

Contents

Ubuntu

Referenced from http://www.odrakir.com/blog/?p=382

  • Download the install file
  • Open a terminal window
  • Aptana has dependencies so you’ll need to install Mozilla and libswt3.1
    • sudo apt-get install mozilla
    • sudo aptitude install libswt3.1-gtk-java (libswt3.2-gtk-java for feisty)
  • Chmod the install file to make it executable - chmod +x Aptana_IDE_Setup.bin
  • Excecute the file - ./Aptana_IDE_Setup.bin
  • Now, the installation should be easy, just read and answer the wizard’s questions until it’s finished
  • Aptana needs a environment variable set for mozilla so we’ll have to code ourselfs a little script in order to set the variable every time we need to run Aptana and not just once inside the terminal window. Now copy this and save the file.
touch aptana
sudo gedit aptana
#/usr/bin
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
~/Aptana/aptana
  • For feisty:
#/usr/bin
export MOZILLA_FIVE_HOME=/usr/lib/firefox
~/Aptana/aptana
  • Chmodit so it can be executed. - chmod 755 aptana
  • Now you can copy it to /bin - sudo cp aptana /bin/

Fedora Core / SUSE Linux

This is suggested for Fedora Core users and possibly SUSE linux users as well. Run the following commands on the installer:

cp Aptana_IDE_Setup.bin Aptana_IDE_Setup.bin.bak
cat Aptana_IDE_Setup.bin.bak | \
sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > \
Aptana_IDE_Setup.bin

this may also need to be run on the uninstaller:

cp Aptana_Uninstaller Aptana_Uninstaller.bak
cat Aptana_Uninstaller.bak | \
sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" > \
Aptana_Uninstaller

And then continue with the installation. Failure to do so may result in the error 'error while loading shared libraries: libc.so.6'

Generally, you will need to set the environment variable MOZILLA_FIVE_HOME to the location of your Firefox or Mozilla directory (this example uses bash syntax):

export MOZILLA_FIVE_HOME=/usr/lib/firefox-1.0/

If this does not immediately work, see the Mozilla topic below for further information.

RedHat 9

You need the Mozilla version 1.4 GTK2 RPMs for RedHat 9. Mozilla 1.5 GTK2 or Mozilla 1.6 GTK2 can also be used. These can be downloaded from Mozilla.org.

  1. Uninstall any prior Mozilla version
  2. Install the Mozilla RPMs
  3. Run Mozilla once. Verify the application opens HTML documents correctly. Check the version number in the Mozilla About dialog.. Verify you now have the Mozilla configuration file /etc/gre.conf.
  4. Start Aptana.

Other Linux Distributions

You need the Mozilla version 1.4 GTK2 for your distribution. Mozilla 1.5 GTK2 or Mozilla 1.6 GTK2 can also be used.

  1. If you are using SWT 3.0, download the Mozilla 1.6 Xft and GTK2 build from Mozilla.org. If you are using SWT 3.1, you can choose to use a more recent Mozilla 1.7.x GTK2 from Mozilla.org.
  2. Uninstall any prior Mozilla version.
  3. Extract and install the Mozilla build.
  4. Run Mozilla once. Verify the application run correctly and check the version number in the Mozilla About dialog.
  5. Set the environment variable MOZILLA_FIVE_HOME to the folder containing your Mozilla install. e.g. setenv MOZILLA_FIVE_HOME /usr/lib/mozilla
  6. Start Aptana.

Aptana as Eclipse Plugin

Debian Etch Aptana Eclipse Plugin Notes

To get the Aptana plugin working with Eclipse on Debian Etch (Feb. 8, 2007) I had to install libxul-dev (along with the dendency xulrunner). I am using Eclipse Version: 3.2.1 downloaded from eclipse.org. I have not tried using Aptana with the debian provided Eclipse package.

UPDATE: In addition to the above procedure I had to set the environment variable MOZILLA_FIVE_HOME to something different from /usr/lib/iceweasel This variable can be set to empty among other things, but not to /usr/lib/iceweasel if you have iceweasel installed, because you'll get the infamous error:

No more handles [NS_InitEmbedding /usr/lib/iceweasel error -2147221164]

which according to information above means iceweasel is statically linked to gecko.

And if you don't set the environment variable at all you get the error:

No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]

My conclusion at this point is that with the MOZILLA_FIVE_HOME set to nothing it forces eclipse/aptana to look for the dynamically linked version of gecko installed with libxul-dev. Thus do something like:

export MOZILLA_FIVE_HOME=

before starting eclipse with aptana plugin.

This post covers common Linux installation issues. If you have an issue that is not listed here, or managed to solve the particular issue on your platform, please post a note to the forum. We will update this post with new information as we resolve each issue. It's been great hearing everyone's response, and we're making every effort to solve any issues that come up.

Error Troubleshooting

Aptana fails with "MOZILLA_FIVE_HOME not set" in the log file

Solution: acketon contributed a simple script

#! /bin/bash
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
cd /home/acketon/Aptana
./aptana

Call the file aptana_start.sh in the aptana folder and set the file as executable.

You may need to put /usr/lib/mozilla in quotes, or alternately, if /usr/lib/mozilla does not link to the actual mozilla install directory, you may need to use a path like /usr/lib/mozilla_1.7.12 (or whatever version you have).

org.eclipse.swt.SWTError: No more handles

(java.lang.UnsatisfiedLinkError: /home/ingo/Aptana/configuration/org.eclipse.osgi/bundles/62/1/.cp/libswt-mozilla-gtk-3139.so: libxpcom.so: cannot open shared object file: No such file or directory)

It's likely you have libstdc++.so.6 installed, but you need libstdc++.so.5. On Fedora Code 5, you can type the following:

yum install compat-libstdc++-33

Mozilla Requirements

You need one of the following versions of Mozilla/Firefox:

  • Mozilla version 1.4 GTK2 - Mozilla 1.6 GTK2 can be used with SWT 3.0.
  • Mozilla version 1.4 GTK2 - Mozilla 1.7.8 GTK2 can be used with SWT 3.1.
  • Firefox can be used with SWT 3.1 (Linux only), provided that it has been compiled with linkable Gecko libraries. It is important to note that Firefox downloads from mozilla.org currently do not satisfy this criteria, but Firefox installations that are included in major Linux distributions typically do. Attempting to use a statically-linked Firefox install will display the error message "No more handles [NS_InitEmbedding...error -2147221164]".


The version of Mozilla or Firefox installed on your system varies with your Linux distribution. The following Linux distributions meet the Mozilla requirements for using the Browser widget.

  • RedHat Enterprise Linux 3
  • Suse 9

The following Linux distributions meet the Firefox requirements for using the Browser widget.

  • RedHat Enterprise Linux 4 (Note that you may need to set the environment variable MOZILLA_FIVE_HOME to the folder containing your Firefox install. e.g. setenv MOZILLA_FIVE_HOME /usr/lib/firefox-1.0.4)