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.
The tar.gz file was not downloaded correctly with curl. Review the curl command to resolve
You can check that it is a tar file by using the fiile command.
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
python
[root@redmine: # file ruby-2.6.5.tar.gz
ruby-2.6.5.tar.gz: XML 1.0 documen, ASCII text