Help us understand the problem. What is going on with this article?

tar.gzが展開できない

はじめに

tarでtar.gzファイルを展開しようとしたところ、エラーが出てうまくいかないという事象に遭遇したため、トラブルシューティングと解決方法をまとめてみmた。

結論

curlでtar.gzファイルが正しくダウンロードできていなかった。curlコマンドを見直して解決

切り分け

fiileコマンドを使うことでtarファイルであることを確認できる。

正しいtar.gzファイル

[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

curlが失敗していたtar.gzファイル

[root@redmine: # file ruby-2.6.5.tar.gz
ruby-2.6.5.tar.gz: XML 1.0 documen, ASCII text
elu_jaune
Windows Server メインの雑食おじさん。 詳しい業務経歴はLinked Inに掲載。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした