Issues uncompressing a tar.gz file

前端 未结 3 1269
深忆病人
深忆病人 2021-02-07 09:35

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

相关标签:
3条回答
  • 2021-02-07 10:23

    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.

    0 讨论(0)
  • 2021-02-07 10:25

    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"
    
    0 讨论(0)
  • 2021-02-07 10:39

    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.

    0 讨论(0)
提交回复
热议问题