21

I just did a fresh install of 12.04 Precise. In Eclipse, if I do "Help" > "Check for updates" I see 8 packages which are grayed out with the message "Insufficient access privileges to apply this update." Any idea how I fix this?

1

5 Answers 5

6

If you install Eclipse from the Ubuntu repository, the Eclipse install will be owned by root. The proper way to update base packages is to use the Ubuntu upgrade tools, not the Eclipse update tools. I believe it is possible to install addons in your Workspace but I would not recommend mixing package managers.

If you want to use the Eclipse update process you need to download the Eclipse from the Eclipse download site. When I do that, I install under /opt after setting the privileges to my user id to write there. Unpackage as the user you will be using to run Eclipse.

EDIT: I often the permissions on /opt to 1777 to allow anyone to create packages there. Alternatively I use chgrp users /opt and set the permissions to 1775. This allows members of the uses group to add new packages to /opt.

5
sudo eclipse

Did the job for me, I was able to install new software (eclipse add-ons) and work with it after restart of eclipse.

2

I'm not a big expert in Eclipse, but my understanding is that Eclipse's own update system is sort of concurrent to Ubuntu update system (this is also true for many other packages which have their own update methods, for example Python modules - you can either install them from Ubuntu repos using apt-get install, or from Python package index using easy_install).

In those cases, the other, non-Ubuntu update mechanism will try to override files installed from Ubuntu repositories, which, naturally, would require root privileges. Also, I'm not sure it is a good idea - it is likely to create a total mess of files partially installed from Ubuntu repositories and partially using the application's update system.

The point is - if you installed Eclipse from Ubuntu repositories, it is better to stick with updates available from Ubuntu repositories and ignore the "Check for updates" option in Eclipse. If you require some Eclipse plugin/extension, you also should install it from Software Center.

If Ubuntu versions of Eclipse packages are not bleeding edge enough for you, I'd recomment to download a separate copy of Eclipse from their website (you can also choose the version of Eclipse this way) and run it from your home directory - this actually is quite easy. Then you will be able to update that copy of Eclipse using its own update mechanism and install any plugines, even if they're not available in Ubuntu repos.

1

Ubuntu Software Center

If you are installing a package through the Ubuntu Software Center, then you should not update from within Eclipse (the OS software-update service would make those changes).

If you would like to manage your own application versioning, you need to download the tar from Eclipse directly (recently, you can download a specialized version for Android Development).

Manual Installation

For single-user only (easiest)

  • I unpacked it and copied it to my home in a new subdirectory ~/bin/
  • I put the Android SDK into the dropin folder for Eclipse (in my case ~/bin/eclipse/dropins/)
  • I continued with the rest of the steps for installing the ADT Plugin. Since I used a custom path for the Android SDK, I had to specify that in the Eclipse Window > Preferences.

Installation for all users

If you want android-studio to be available to all users (based on the above) you should be unpacking the tar to /opt rather than the /usr/local or /usr/bin (with the latter being preferred for specific-user installations). Setup properly, we shouldn't need to change user group permissions or any other high-level administration.

  1. Unpack the .tar file where it lays
  2. Using a Terminal window, navigate to that folder location (probably cd ~/Downloads), invoke sudo -i (You will need administrator/su permissions for the next few steps)
  3. mv android-studio /opt moves the files you unpacked (requires permissions)
  4. gedit android-studio.desktop this opens a text editor so that we may create a shortcut icon to open your new program. Insert the following code, then save the .desktop file.
    [Desktop Entry]
     Name=Android-Studio
     Comment=your comments
     Exec=/opt/android-studio/bin/studio.sh
     Icon=/opt/android-studio/bin/idea.png
     Terminal=false
     Type=Application
     Categories=Utility;IDE;Development;
  • To finish up, desktop-file-install android-studio.desktop

We are done with the terminal window, you can close it or exit That .desktop file now allows you to search for and find android-studio within Ubuntu's Unity interface. In other words, click that icon in the upper-left to search for android-studio You may right-click on the icon while it is running and "lock it to the launcher."

You can also create menu options to appear for your application launcher, see the Ubuntu Documentation on Unity Launchers.

0

Eclipse's update mechanism doesn't know about or communicate with Ubuntu's package management system (PMS). Thus, if you update through Eclipse's update mechanism you can cause problems between it and Ubuntu's PMS (files out of sync, botched configurations, etc.).

If you're a serious developer and need later versions of Eclipse, you're better off installing Eclipse outside of Ubuntu's PMS as the PMS is always so laughably out of date where Eclipse is concerned. Example: I'm on Ubuntu 14.04 LTS and even after doing sudo apt-get update && sudo apt-get upgrade before posting this, the latest Eclipse version available through the PMS is 3.8.1-5.1, but 4.6.1 has been out for a while now. This has always been the case -- the version of Eclipse available in Ubuntu PMS is always considerably-to-extremely outdated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .