[LINUX] tar.gz cannot be expanded

Introduction

When I tried to extract the tar.gz file with tar, I encountered an event that an error occurred and it did not work, so I tried to summarize the troubleshooting and solution.

Conclusion

The tar.gz file was not downloaded correctly with curl. Review the curl command to resolve

Carving

You can check that it is a tar file by using the fiile command.

Correct tar.gz file

python


[root@redmine: # file ruby-2.6.5.tar.gz
ruby-2.6.5.tar.gz: gzip compressed data, was "ruby-2.6.5.tar", from Unix, last modified: Tue Oct 1 20:01:03 2019, max compression

The tar.gz file where curl was failing

python


[root@redmine: # file ruby-2.6.5.tar.gz
ruby-2.6.5.tar.gz: XML 1.0 documen, ASCII text

Recommended Posts

tar.gz cannot be expanded
Tensorflow cannot be imported
When USB cannot be formatted
When pydub cannot be installed
matplotlib image cannot be renamed and saved
Python modules with "-(hyphen)" cannot be removed
Items that cannot be imported with sklearn