Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When i try to install something it gives me this error:

HTTP request sent, awaiting response... 403 Forbidden 2014-04-23 09:32:53 ERROR 403: Forbidden.

download failed

Oracle JDK 7 is NOT installed........

But i have Oracle JDK 7 installed :

mostafa@mostafa-EP31-DS3L:~$ sudo update-alternatives --config java

0 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 auto mode

1 /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java 1061 manual mode

* 2 /usr/lib/jvm/java-7-oracle/jre/bin/java 1 manual mode

Press enter to keep the current choice[*], or type selection number:

what is the problem and how can i resolve this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

as you know oracle bans some countries and ... first add key:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

then use apt-install to install the package:

sudo apt-get install oracle-java7-installer

after getting error 403, use ls:

ls /var/cache/oracle-jdk7-installer/

jar.binfmt  javaws-wrapper.sh  jdk-7u55-linux-x64.tar.gz  wgetrc

copy .tar.gz filename and search/download it in the web (http://enos.itcollege.ee/~jpoial/download/jdk7/).

then copy downloaded file to cache:

sudo cp ~/Downloads/jdk-7u55-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/

to ensure that you download the correct file, use md5sum:

md5sum jdk-7u55-linux-x64.tar.gz
9e1fb7936f0e5aaa1e64d36ba640bc1f jdk-7u55-linux-x64.tar.gz

result must match with oracle checksum at http://www.oracle.com/technetwork/java/javase/downloads/java-se-binaries-checksum-1956892.html

after this if you run the install command, installation will be done correctly using cached file:

sudo apt-get install oracle-java7-installer
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.