Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
How did you "realize" this? By checking the version after installation or by checking the version number in yum? The version numbers of the different packages listed through yum might be misleading, e.g. when I look at the eclipse-platform package, it shows version 4.3 –  ILMostro_7 Jun 19 at 21:30
    
@ILMostro_7 when I open up Eclipse, the splashscreen says "Eclipse Helios" and the "About Eclipse" version says version 3.6.1 –  Thunderforge Jun 19 at 21:31

2 Answers 2

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., /opt/eclipse and:

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 /bin or /usr/bin.

share|improve this answer
    
I wrote in the original question that I am aware that I can just go to the website and download it, but I would like to know how to do it from the command line to begin with (an educational experience, I guess). Besides, it looks like downloading it manually requires a trip to the Terminal anyway to change $PATH, so I might as well install it from the Terminal. Can this be done? You mentioned the distro policy being the bottleneck; can that be updated? –  Thunderforge Jun 19 at 21:35
    
The reason I gave you this answer is that if the distro repo doesn't have what you want, doing it purely from the command line would be pretty much exactly the same as above, except instead of using a browser you'd do the download with a tool such as wget (or as per IlMostro's answer, git). WRT updating the distro policy, no, the policy is set purposefully and for whatever reason, but some distros have alternative repos you can use (dunno about oracle) if you configure them in. You can also check to see if there's a newer version that's not the default with yum search eclipse. –  goldilocks Jun 19 at 21:41

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:

[Eclipse]
name=Eclipse Kepler repo
baseurl=http://download.eclipse.org/releases/kepler/yum/
gpgcheck=0
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.