Tuesday, February 1, 2022

[SOLVED] curl | tar - gzip: stdin: not in gzip format

Issue

I'm trying to install ffmpeg on travis with this command:

curl http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz | tar -C /usr/local/bin/ -xvz

I get this error:

$ curl http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz | tar -C /usr/local/bin/ -xvz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time      Current
                                 Dload  Upload   Total   Spent    Left      Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
gzip: stdin: not in gzip format
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
The command "curl http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz | tar -C /usr/local/bin/ -xvz" failed and exited with 2 during .

however, it works locally on OS X. what's going on?


Solution

seems like i just used the wrong command! should've been

curl http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz | sudo tar -C /usr/local/bin/ -xJ --strip-components=1


Answered By - Jonathan Ong
Answer Checked By - David Marino (WPSolving Volunteer)