2

I downloaded a file from lynx sources site:

http://invisible-mirror.net/archives/lynx/tarballs/?C=M;O=D

Specifically this file: lynx2.8.8rel.2.tar.bz2 (tried several from the site).

When I apply tar xjf to the file I receive the following error:

bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now

However, if I use Ubuntu (16.04) "File" application all goes well. Any suggestions as to why that is the case?

andrew.46
  • 39,359

1 Answers1

3

First check the md5sum of the file:

md5sum lynx2.8.8rel.2.tar.bz2 
b231c2aa34dfe7ca25681ef4e55ee7e8  lynx2.8.8rel.2.tar.bz2

And if this is correct any of the following commands should work without fail on a default installation of Ubuntu:

tar xvf lynx2.8.8rel.2.tar.bz2
bzcat -dk lynx2.8.8rel.2.tar.bz2 | tar xvf -
bzip2 -dck lynx2.8.8rel.2.tar.bz2 | tar xvf -

(The j option to call bzip2, which you have used in your own commandline, is not normally required by tar in modern versions.)

If the md5sum is different from the one I have given above this will indicate that there is something amiss with the download process and the archive itself rather than a problem with either the tar or bzip2 applications...

Note:

If using lynx to download this particular file (which I believe you have been attempting): on my system, using Lynx Version 2.8.8rel.2 the following produced a good download when tested with md5sum:

lynx -source \
'http://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.8rel.2.tar.bz2' \
> lynx2.8.8rel.2.tar.bz2

References:

andrew.46
  • 39,359