I'm new to Linux and have just been given a VM of Oracle Linux to work with. I need to install Eclipse on it and, after a bit of research, discovered that this could most easily be done with the following command in the Terminal:
sudo yum install eclipse
However, I noticed that this installed Eclipse 3.6.1 (Helios), rather than the more recent Eclipse 4.3.2 (Kepler). I realize that I can just go to the Eclipse website and download the most recent installation, but I'd like to know how to do this from the command line (as an educational experience, plus if I have to do this again I'd like a quick and simple way to do it). How can I install the most recent version, or any particular version, of Eclipse via the Terminal?
Distro repositories don't necessarily contain the latest version of something -- that depends on the distro policy.
Your best bet in this case, since it is drop dead simple, is to just install an Eclipse from the website. Doing this means you have to resolve any prerequisites yourself, but again it is pretty simple in this case: you just need a JRE (or, presuming you are using this for java programming, a JDK).
Beware that installing eclipse this way doesn't put the executable in
$PATH, but it's inside the top level of the archive download. Unpack that where ever you want -- e.g.,
ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse
It can figure out where it actually is this way and use whatever other resources it needs from the archive. You could use
$HOME/bin as the second path if you prefer there (presuming that's in
$PATH). Don't use a path normally used by the distro installer, such as
Take a look at this wiki on the eclipse website, regarding the use of
git to clone packages to your local system. For example, execute the following to clone the C-Development-Toolkit:
git clone git://git.eclipse.org/gitroot/cdt/org.eclipse.cdt.git
You could also try to find a way to get it with
wget; regardless, keep in mind that you should have a working java development toolkit.
Furthermore, you could create a
eclipse.repo file in
/etc/yum.repos.d/ as per this example with the EclipseSCADA project. For a general Eclipse environment, maybe try to include the following in that file:
name=Eclipse Kepler repo
provides an option for copr
, Fedora's third-party repository system, which makes it much
easier for users to install packages not available in the distribution repos.
$ dnf copr
enable name/project [chroot]
copr enable rhscl/perl516 epel-6-x86_64
copr enable ignatenkobrain/ocltoys
copr disable rhscl/perl516
copr list ignatenkobrain
copr search tests
Then, to search for eclipse, do:
dnf copr search eclipse
mbooth/eclipse-luna : This repository provides Eclipse Luna (4.4) for Fedora 20.
: Fedora 20 ships with Eclipse Kepler (4.3) so this repository provides builds of Eclipse Luna for those who want the very latest Eclipse on a stable Fedora release.
: If you have problems, please contact me directly via email ([email protected]) or IRC (mbooth on Freenode channels #fedora-devel #fedora-java and #fedora-uk)
Finally, as per the example, enable the name/project and install
dnf copr enable mbooth/eclipse-luna
Notice At the time of writing this, the repo is set-up for fedora20 and fedora21; so, the user might have to make some changes to the baseurl in
/etc/yum.repos.d/_copr_... file until the maintainer sorts it out.