I have been trying to uncompress the following file:
sudo wget http://download.oracle.com/otn-pub/java/jdk/7u21-b11/jdk-7u21-linux-x64.tar.gz
w
The reason the file isn't extracting properly is because the download page is setting a cookie when you accept the license agreement. If you don't have the session cookie when attempting to download the file, it redirects you to an HTML page that tells you to accept the agreement first. If you open the .tar.gz that you're getting from wget
, you'll see that it's an HTML file since it's not getting said cookie.
The easiest way to solve it is to download the file first, using your web browser, and then upload it to your web server.
I know this thread is old, but I figured someone might be able to use this information when searching the web for why they can't unzip their JDK distros on raspberrypi
If you pass these parameters to wget it will also accept the policy.
--no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
j883376 answer is right.But The easiest way to solve it is to download the file first, using your web browser, and then copy the download url then wget it useing your server.