SiKing

October 8, 2009

Installing Eclipse on Linux Mint (Ubuntu)

Filed under: linux — SiKing @ 9:21 pm
Tags:

Even thought Eclipse is available in the standard Ubuntu repos, it is not as easy or straightforward to install as other packages. Here is what I did to install the latest Eclipse + Pydev + Subclipse on my Mint 5 :mrgreen: (Ubuntu 8.04 equivalent).

Step 1: Install and update Eclipse

  1. sudo apt-get install eclipse-pydev, or you can just install the package eclipse-pydev from Synaptic. Pydev has Eclipse (and a bunch of other stuff) as a dependency, so you will get both. Subclipse is not available in the repos; no idea why; we will handle that separately below.
  2. Eclipse has it’s own package manager, which is not exactly compatible (in form or function) with APT (note that Synaptic is just a graphical front end for APT). Once the install completes lock the eclipse and eclipse-pydev packages: in Synaptic select the package and then select Package > Lock Version. This will ensure that Synaptic knows it is installed (in case it is a dependency for something else), but it should never mess with trying to update it.
    Eclipse pinned
  3. Start up Eclipse as a normal user, and enter your default working directory. This step will ensure that all the work files that Eclipse needs will be created, and they will be created with the correct permissions and in correct places.
  4. Next you want to update Eclipse. What Eclipse does not do for you, and you just simply have to know, is that you need to do this with root privileges – majority of Eclipse lives in /usr/lib/eclipse. If you skipped the previous step (creating all the work files), then the work files are going to be created with wrong privileges, and subsequently nothing is going to work right; even after I chowned all the ownership on ~/workspace I still had problems. Start Eclipse from a terminal with sudo eclipse. When it asks you where you want to keep your workspace, this time it does not really matter what you tell it – I normally tell it in /tmp.
  5. To update Eclipse, select Help > Software Updates > Find and Install, and follow Scenario 1 from the Eclipse wiki.

Step 2. Update Pydev

  1. Still as root in Eclipse, again select Help > Software Updates > Find and Install. This time select the second option “Search for new features to install”. Pydev was sold and re-licensed, and I suspect the new owners are not interested in keeping Pydev in the repos. So the new version is actually a new product.
  2. I was presented with three sites to search. I did not find anything I was interested in on Callisto Discovery Site. Pydev Extensions is what you want. The Eclipse Project Updates did find things, but I think they buggered up my install, so from now I just avoid them.
    install sites
  3. When presented with the available updates, select Pydev. The Pydev Extensions are a paid feature, and I am not using Mylyn.
    updates
  4. Another restart. If you check, you will notice that the Pydev Extension site has been removed. This means that from now on, to update Pydev, you can go through “Search for updates of the currently installed features” and not the “Search for new features to install” route.

Step 3. Install Subclipse

  1. Subclipse is a new feature, so still as root in Eclipse go to “Search for new features to install”.
  2. This time you have to add a New Remote Site. You get the necessary information from the Subclipse site.
  3. After that continue through the wizard. From the presented choices, I only selected Subclipse, minus the Revision Graph which I could not get some dependencies for.
    subclipse updates
  4. You need that JavaHL stuff, and contrary to the way things look above, you did not just install it. 😦 sudo apt-get install libsvn-javahl
  5. Now it gets complicated! Start up Eclipse, and see if it cluedin and figured out what you just did. From the menus select Window > Preferences, and in the popup window select Team > SVN. Under the SVN Interface, you need to see a version of some kind. If you see “Not Available”, Eclipse did not figure it out.
    Eclipse preferences
  6. If it is not right, first check you got the correct version of everything. There is a Subversion server – Subclipse version compatibility, and then Subclipse – JavaHL version compatibility. So, as an example, I am trying to connect to SourceForge which supports Subversion v1.5. So I will need Subclipse at least v1.4, which needs JavaHL v1.5. I am using Mint5 – Ubuntu Hardy – and according to this, I will need to grab JavaHL from their backports repository. If you are running Intrepid – Mint 6 – or later, you should be fine. Including additional repos in your system I will leave as an exercise to the reader.
  7. If after all of that it is still not working 😮 , you will need to edit your eclipse.ini. I did not have to do this, and I suspect that newer versions of Mint will be the same.

Last word

To remove this mess from your system:

$ sudo bash
# apt-get purge eclipse
# apt-get autoremove
# rm -rf /usr/lib/eclipse

Maybe I’m just spoiled, but all this should not be this difficult!

Update 09/10/26: So apparently I forgot an important step. After doing all these updates you have to rm -rf ~/.eclipse to reset everything on your account. Also, Pydev has been restructured (again), and re-released as version 1.5. Unfortunately, they forgot to notify the update manager, and you have to do it manually – note the ‘Quick Install’ cutesie note on the right hand side.

Did I mention that is beyond-stupid complicated?

Advertisements

1 Comment »

  1. under mint 7 things get lots more complicated. JavaHL is renamed libsvn-java, and you need the site file as well as the url/uri or it just wont find either.

    Comment by sirstrom52 — October 17, 2009 @ 3:21 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: