6

I have a .tgz file and I'm running tar -xfvz cudnn-9.0-linux-x64-v7.tgz but that I get the following error:

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I don't understand why this is happening. I got the the file using the following curl command: curl -O https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-linux-x64-v7.tgz

Perhaps this is a problem with curl? I tried using wget but that doesn't even get the file for some reason.

What am I doing wrong?

With the command: tar -xfz cudnn-9.0-linux-x64-v7.tgz I get the following error:

tar: z: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
  • Try to swap the order of the options. I think f should be followed directly by the file name, tar -xvzf cudnn-9.0-linux-x64-v7.tgz – sudodus Mar 30 '18 at 20:22
  • Just tried it. Same problem – Jonathan Mar 30 '18 at 20:22
  • 1
    Try without the option z. I think for extraction, it will find the compression method automatically; it might not be what you think from the extension. – sudodus Mar 30 '18 at 20:24
  • Still doesn't work. :( – Jonathan Mar 30 '18 at 20:25
  • Is there any published checksum, for example md5sum? In that case you can check if the file was downloaded correctly. – sudodus Mar 30 '18 at 20:38
11

Your answer is simple, that file doesn't exists and curl just save a HTML document as a .tgz file!

You can check it by opening this link in your browser. As you see, Page Not Found!

Also you can check it by command line:

curl -Is https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-linux-x64-v7.tgz | head -n 1
HTTP/1.1 404 Not Found

As you can see, it has the same output.

So when you run this command:

curl -O https://developer.nvidia.com/compute/machine-learning/cudnn/secure/v7.0.5/prod/9.0_20171129/cudnn-9.0-linux-x64-v7.tgz

Curl just download this web page and save it as .tgz file. So you can change .tgz suffix to .html and open that file with favorite web browser like firefox, because its not in gzip format it is just a HTML document.

Also when we check cudnn-9.0-linux-x64-v7.tgz file format, as you see it is HTML document and it's not gzip compressed data:

file cudnn-9.0-linux-x64-v7.tgz 
cudnn-9.0-linux-x64-v7.tgz: HTML document, ASCII text, with very long lines, with CRLF, LF line terminators

Update:

For download cudnn you can visit this page, and after logging in, you can find many versions of cuddn that you can download them.

And this is exactly the same file with which one, you want to download it before (But now many new versions and easy install files like .deb are available and you can download them instead).


Update2:

Because you said, you can't access web browser, I got this download link and write this command:

curl -O http://developer.download.nvidia.com/compute/redist/cudnn/v7.0.5/cudnn-9.0-linux-x64-v7.tgz

So you can use it by command line without web browser or logging in.

  • Then how else would I download the file? I noted in the question that wget didn't work. – Jonathan Mar 30 '18 at 20:44
  • Perhaps I can save it in google drive using another machine and download it that way? – Jonathan Mar 30 '18 at 20:46
  • I am unable to find any good links to cudnn downloads – Jonathan Mar 30 '18 at 20:56
  • That's exactly the page and link I used though. – Jonathan Mar 30 '18 at 21:09
  • I can go into a browser because I'm hooking into a remote cluster. There is no gui desktop on that environment. – Jonathan Mar 30 '18 at 21:27
1

As per this SuperUser answer:

If you are using the -v flag, try leaving it off. This should reduce the output and let you see what is going on.

I'll see if I can find a better link. In the meantime change your command to:

tar -xfz cudnn-9.0-linux-x64-v7.tgz

Now you can see all the error messages. Then adjust your question accordingly or answer your own question using the new information.

  • With that command, I go back to my previous error. @AliRazmdideh – Jonathan Mar 30 '18 at 20:33
  • @Jonathan confirm the file exists with locate cudnn-9.0-linux-x64-v7.tgz – WinEunuuchs2Unix Mar 30 '18 at 20:44
0

The f option specifies the file, so you must provide the file name right after the f option (order matters in this case):

Also the file is not compressed so remove the z option

tar -xvf cudnn-9.0-linux-x64-v7.tgz
  • See comments from question – Jonathan Mar 30 '18 at 20:33
  • Still nope. Doesn't work. – Jonathan Mar 30 '18 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.