Home > HOWTOs > [SOLVED] E: Unable to locate package oracle-java7-installer [Ubuntu 13]

[SOLVED] E: Unable to locate package oracle-java7-installer [Ubuntu 13]

Unable to locate package oracle-java7-installer [Ubuntu 13]

Was installing Java today, this is an easy install thanks to “ppa:webupd8team/java“, but when I tried it was not working, but has worked for me all this while.
Little goggling around found me a solution. Here is full conversation if you wanted to have a look http://ubuntuforums.org/showthread.php?t=2048793
Installing JAVA on Ubuntu is simple. Do the below to add the repository and run the below command ‘sudo apt-get install oracle-java7-installer’ to install.

Error.

 ahmed@ubuntu:~$ sudo add-apt-repository ppa:webupd8team/java
ahmed@ubuntu:~$ sudo apt-get update
ahmed@ubuntu:~$ sudo apt-get install oracle-java7-installer

ahmed@ubuntu:~$ sudo apt-get install oracle-java7-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package oracle-java7-installer

Solution.

Elevating to root.
 ahmed@ubuntu:~$ sudo su
Adding to deb.
 root@ubuntu:~# echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" > /etc/apt/sources.list.d/webupd8team-java.list
Adding to deb-src
 root@ubuntu:~# echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" >> /etc/apt/sources.list.d/webupd8team-java.list
Making sure we have the key as well.
 root@ubuntu:~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
Lets update our apt-get repository.
 root@ubuntu:~# apt-get update
Now Install Oracle Java
 root@ubuntu:~# apt-get install oracle-java7-installer


root@ubuntu:~# exit
Checking Version
 ahmed@ubuntu:~$ 
ahmed@ubuntu:~$ java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
ahmed@ubuntu:~$
All done. !!!
Advertisements
Categories: HOWTOs
  1. September 8, 2014 at 9:29 pm

    Can you explain me, how did this work?

  2. September 9, 2014 at 10:22 am

    I just update / adding the new package to repos.
    And added a key to keyserver that it.. 🙂

    Below are the things we need to do to make it work.

    1. sudo su
    2. echo “deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main” > /etc/apt/sources.list.d/webupd8team-java.list
    3. echo “deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main” >> /etc/apt/sources.list.d/webupd8team-java.list
    4. apt-key adv –keyserver keyserver.ubuntu.com –recv-keys EEA14886

    Hope that helps.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: