5
votes

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?

3

3 Answers

1
votes

.xz is not .gz. GNU tar apparently recognises XZ format; but OS X does not use GNU tools. I found this quote:

Without installing anything, a TAR archive can be created with XZ compression using the tar program with the undocumented --xz argument.

1
votes

Your tar might not be able to handle .xz files.

According tothis link you can try to install xz-utils and use the -J flag:

tar -C /path/to/output -xJv
0
votes

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