Why does Eclipse's "Check for updates" not work
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?
Solution 1:
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
.
Solution 2:
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.
Solution 3:
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.
Solution 4:
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
- I downloaded
eclipse-SDK-4.2-linux-gtk-x86_64.tar.gz
from the Eclipse download site
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
- The following is taken from my answer to a question on android-studio so you will have to change references from android-studio to your Eclipse specifics.
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.
- Unpack the .tar file where it lays
- Using a Terminal window, navigate to that folder location (probably
cd ~/Downloads
), invokesudo -i
(You will need administrator/su permissions for the next few steps)mv android-studio /opt
moves the files you unpacked (requires permissions)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.