View Full Version : [ubuntu] how to install a .rpm file

March 25th, 2013, 07:56 PM
i dont know how to install a file. I have downloaded jdk-6u43-linux-i586-rpm.bin (http://download.oracle.com/otn-pub/java/jdk/6u43-b01/jdk-6u43-linux-i586-rpm.bin)from oracle.com.Please guide me how to install it using terminal.

March 25th, 2013, 07:59 PM
First of all delete that file. RPM files are for Red Hat or Fedora machines, not for Ubuntu.

Then install Java by typing the following commands into a terminal...

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

March 25th, 2013, 08:01 PM
but i want to install java6. Is there any way to install it.

March 25th, 2013, 08:49 PM
You can replace oracle-java7-installer with oracle-java6-installer in the above command.

Is there any particular reason you need version 6, it reached end-of-life in February and won't be getting any more updates.
From a security point of view it's much safer to be using 7.

March 25th, 2013, 09:06 PM
yes, i am following moziila wiki to build a platform for android development where it is recommended. https://wiki.mozilla.org/Mobile/Fennec/Android#Building_Fennec

March 25th, 2013, 09:17 PM
i have also installed oracle-java6-installer
but why this command is not working
sudo apt-get install sun-java6-jdk mercurial ccache

March 25th, 2013, 09:28 PM
Try this instead...

sudo apt-get install mercurial ccache

The sun-java6-jdk package isn't in the repositories anymore due to licensing issues. But you don't need it anyway as you have already install Java with the commands I gave you earlier.