Tar short read ошибка

I get an error when I uncompress my tar.

I do this:

tar xvf VM_DECOMPTES.tar

and after some time I get the following error:

tar: short read

What is going wrong here?

tar: unrecognized option `—version’ BusyBox
v1.9.1-VMware-visor-klnext-2965 (2010-04-19 12:53:48 PDT) multi-call
binary

asked Aug 23, 2013 at 10:24

Mercer's user avatar

MercerMercer

8165 gold badges11 silver badges22 bronze badges

3

I suspect that your tarfile is corrupted or truncated.

The header of a tarfile contains a size field that contains the length of the file.¹ If the actual file is shorter than the header says it should be, tar will try to read past the filesystem end of file and get back a read shorter than it expected, thus generating the message you see.

¹ This feature dates to when tar was used primarily for Tape ARchiving where you could only know the length of a «file» by reading until you hit an EOF marker on the tape. It was retained for backwards compatibility and also provides a nice (if kinda cheap) check on header and file consistency.

answered Aug 23, 2013 at 10:38

msw's user avatar

mswmsw

10.5k1 gold badge31 silver badges43 bronze badges

Usually this message appears if the tar archive is incomplete. If you run tar tvf ./VM_DECOMPTEST.tar it will check the tar file for inconsistencies.

Michael Mrozek's user avatar

answered Aug 23, 2013 at 10:37

Kamiccolo's user avatar

4

This may be due to the version of tar that you’re running, especially if you are unable to reproduce this issue with GNU tar.

You can build a new version of busybox for your platform by running something like the following commands:

$ wget https://busybox.net/downloads/busybox-1.31.0.tar.bz2
$ tar xjf busybox-1.31.0.tar.bz2
$ cd busybox-1.31.0
$ LDFLAGS=--static make -j16  # if applicable: CROSS_COMPILE=...-linux-gnu-

In particular, there seems to be some sort of bug in unpacking with busybox v1.22.1 (other versions too, perhaps) that has been fixed by v1.31.0.

answered Oct 19, 2019 at 9:10

flaviut's user avatar

flaviutflaviut

8141 gold badge7 silver badges18 bronze badges

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

I get an error when I uncompress my tar.

I do this:

tar xvf VM_DECOMPTES.tar

and after some time I get the following error:

tar: short read

What is going wrong here?

tar: unrecognized option `—version’ BusyBox
v1.9.1-VMware-visor-klnext-2965 (2010-04-19 12:53:48 PDT) multi-call
binary

asked Aug 23, 2013 at 10:24

Mercer's user avatar

MercerMercer

8165 gold badges11 silver badges22 bronze badges

3

I suspect that your tarfile is corrupted or truncated.

The header of a tarfile contains a size field that contains the length of the file.¹ If the actual file is shorter than the header says it should be, tar will try to read past the filesystem end of file and get back a read shorter than it expected, thus generating the message you see.

¹ This feature dates to when tar was used primarily for Tape ARchiving where you could only know the length of a «file» by reading until you hit an EOF marker on the tape. It was retained for backwards compatibility and also provides a nice (if kinda cheap) check on header and file consistency.

answered Aug 23, 2013 at 10:38

msw's user avatar

mswmsw

10.5k1 gold badge31 silver badges43 bronze badges

Usually this message appears if the tar archive is incomplete. If you run tar tvf ./VM_DECOMPTEST.tar it will check the tar file for inconsistencies.

Michael Mrozek's user avatar

answered Aug 23, 2013 at 10:37

Kamiccolo's user avatar

4

This may be due to the version of tar that you’re running, especially if you are unable to reproduce this issue with GNU tar.

You can build a new version of busybox for your platform by running something like the following commands:

$ wget https://busybox.net/downloads/busybox-1.31.0.tar.bz2
$ tar xjf busybox-1.31.0.tar.bz2
$ cd busybox-1.31.0
$ LDFLAGS=--static make -j16  # if applicable: CROSS_COMPILE=...-linux-gnu-

In particular, there seems to be some sort of bug in unpacking with busybox v1.22.1 (other versions too, perhaps) that has been fixed by v1.31.0.

answered Oct 19, 2019 at 9:10

flaviut's user avatar

flaviutflaviut

8141 gold badge7 silver badges18 bronze badges

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

Solution 1

I suspect that your tarfile is corrupted or truncated.

The header of a tarfile contains a size field that contains the length of the file.¹ If the actual file is shorter than the header says it should be, tar will try to read past the filesystem end of file and get back a read shorter than it expected, thus generating the message you see.

¹ This feature dates to when tar was used primarily for Tape ARchiving where you could only know the length of a «file» by reading until you hit an EOF marker on the tape. It was retained for backwards compatibility and also provides a nice (if kinda cheap) check on header and file consistency.

Solution 2

Usually this message appears if the tar archive is incomplete. If you run tar tvf ./VM_DECOMPTEST.tar it will check the tar file for inconsistencies.

Related videos on Youtube

Anne-Marie & James Arthur - Rewrite The Stars [from The Greatest Showman: Reimagined]

03 : 48

Anne-Marie & James Arthur — Rewrite The Stars [from The Greatest Showman: Reimagined]

Unix & Linux: tar: short read (3 Solutions!!)

02 : 02

Unix & Linux: tar: short read (3 Solutions!!)

"Kalabhairava Ashtakam" With Lyrics | Sacred Chants of Kala Bhairava Stotram

05 : 30

«Kalabhairava Ashtakam» With Lyrics | Sacred Chants of Kala Bhairava Stotram

goodbyes & new chapters (+ I got an airwrap and..)

25 : 39

goodbyes & new chapters (+ I got an airwrap and..)

Tar short video

00 : 19

Comments

  • I get an error when I uncompress my tar.

    I do this:

    tar xvf VM_DECOMPTES.tar
    

    and after some time I get the following error:

    tar: short read
    

    What is going wrong here?

    tar: unrecognized option `—version’ BusyBox
    v1.9.1-VMware-visor-klnext-2965 (2010-04-19 12:53:48 PDT) multi-call
    binary

    • On what system are you trying to untar this archive? Have you tried to touch file && tar cvf mytar.tar file && tar xvf mytar.tar and see if the error is still there?

    • What tar implementation and version? tar --version? Which Linux distribution?

    • You might want to try using an actual version of GNU tar as opposed to the one integrated into busybox…

  • tar: invalid gzip magic

  • @Mercer because that is not a .gz file. You are ignoring things that were provided to you to test. What tar version are you using? As earlier mentioned tar --version , then try to tar a file yourself and extract it. See my first comment. Update your post with tests you performed.

  • @Kamiccolo i have edit my post

  • @kamiccolo Please don’t add the -z flag automatically when it’s already mentioned that it’s a .tar file, not a .tgz file…

Recents

Related

I get an error when I uncompress my tar.

I do this:

tar xvf VM_DECOMPTES.tar

and after some time I get the following error:

tar: short read

What is going wrong here?

tar: unrecognized option `—version’ BusyBox
v1.9.1-VMware-visor-klnext-2965 (2010-04-19 12:53:48 PDT) multi-call
binary

asked Aug 23, 2013 at 10:24

Mercer's user avatar

MercerMercer

7765 gold badges10 silver badges22 bronze badges

3

I suspect that your tarfile is corrupted or truncated.

The header of a tarfile contains a size field that contains the length of the file.¹ If the actual file is shorter than the header says it should be, tar will try to read past the filesystem end of file and get back a read shorter than it expected, thus generating the message you see.

¹ This feature dates to when tar was used primarily for Tape ARchiving where you could only know the length of a «file» by reading until you hit an EOF marker on the tape. It was retained for backwards compatibility and also provides a nice (if kinda cheap) check on header and file consistency.

answered Aug 23, 2013 at 10:38

msw's user avatar

mswmsw

10.4k1 gold badge30 silver badges43 bronze badges

Usually this message appears if the tar archive is incomplete. If you run tar tvf ./VM_DECOMPTEST.tar it will check the tar file for inconsistencies.

Michael Mrozek's user avatar

answered Aug 23, 2013 at 10:37

Kamiccolo's user avatar

4

This may be due to the version of tar that you’re running, especially if you are unable to reproduce this issue with GNU tar.

You can build a new version of busybox for your platform by running something like the following commands:

$ wget https://busybox.net/downloads/busybox-1.31.0.tar.bz2
$ tar xjf busybox-1.31.0.tar.bz2
$ cd busybox-1.31.0
$ LDFLAGS=--static make -j16  # if applicable: CROSS_COMPILE=...-linux-gnu-

In particular, there seems to be some sort of bug in unpacking with busybox v1.22.1 (other versions too, perhaps) that has been fixed by v1.31.0.

answered Oct 19, 2019 at 9:10

flaviut's user avatar

flaviutflaviut

7151 gold badge6 silver badges13 bronze badges

I enter this command
su -c busybox tar -xvf /storage/emulated/0/Download/andrax.r5-build5.tar.xz -C /data/data/com.thecrackertechnology.andrax/ANDRAX/

and such an error appears
tar:invalid magic
tar:short read

asked Feb 2, 2021 at 21:04

Yaroslav Morozovskiy's user avatar

1

Automatic detection of the compression format is a GNU feature.

For BusyBox and other tars, specify the format explicitly (busybox tar --help):

    -Z      (De)compress using compress
    -z      (De)compress using gzip
    -J      (De)compress using xz
    -j      (De)compress using bzip2
    -a      (De)compress using lzma

In your case:

busybox tar -xJvf file.tar.xz

(note that if passing it to su -c, the whole command needs to be quoted to be passed as a single argument)

answered Feb 2, 2021 at 21:52

that other guy's user avatar

that other guythat other guy

114k11 gold badges166 silver badges192 bronze badges


tar reports ‘short read’ and fails to untar archive

This bug affects 1 person

Affects Status Importance Assigned to Milestone


Linaro OpenEmbedded

New

Undecided



Riku Voipio

Linaro OpenEmbedded 13.08

Bug Description

Steps to reproduce:

root@genericarmv8:~# curl -s -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.10.tar.gz
root@genericarmv8:~# tar zxf autoconf-2.10.tar.gz
tar: short read
root@genericarmv8:~# echo $?
1

root@genericarmv8:~# tar —version
tar: unrecognized option ‘—version’
BusyBox v1.21.1 (2013-07-17 13:47:15 BST) multi-call binary.

Usage: tar -[cxtZzjahvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]…

I see similar problems with other archives.


Я устанавливаю sqlite на Alpine Linux. Я скачиваю, sqlite-autoconf-3130000.tar.gzно tarне могу открыть. Я попробовал этот ответ, но он не работает. tarдает это сообщение:

tar: invalid magic
tar: short read

Я написал эти команды.

wget https://www.sqlite.org/2015/sqlite-autoconf-3090100.tar.gz
tar -zxvf sqlite-autoconf-3090100.tar.gz



Ответы:


Попробуйте установить пакет tar (apk add tar). Tary Busybox (по умолчанию) не поддерживает все функции.



Это не обязательно означает, что альпийская версия tarнесовместима, так как Франческо указал, что вы действительно должны проверить контрольные суммы файлов.

Я столкнулся с этим, делая curl https://github.com/someproject/releases/project-1.1.0.gz | tar -xvzfв моем Dockerfile.

Оказывается, то, что я забыл, это то, что он curlбудет следовать за перенаправлениями, только если вы разрешите это -L, и поэтому он никогда не попадал в реальный файл, он буквально загружал html, сообщая, что было перенаправление. Добавление -Lпозволило мне сохранить файл без раздувания моего контейнера с новым tar(за исключением «раздувания», добавленного curl).


tar: неверная магия означает, что файл поврежден.

Пожалуйста, проверьте md5sum, если совпадает … вот что я получил:

 md5sum  sqlite-autoconf-3090100.tar.gz 
 74931054399a2d7acf35637efe8d6f45  sqlite-autoconf-3090100.tar.gz

Я получил ту же проблему и решил ее, но я не уверен, что вы столкнулись с той же проблемой.

Код, вызвавший ошибку :

wget www.example.com/file.tar.gz
tar -zxvf file.tar.gz

Код, который разрешил это:

wget https://www.example.com/file.tar.gz
tar -zxvf file.tar.gz

Обратите внимание, что я забыл «https: //», в котором файл был загружен, но tar дал мне ту же ошибку. Если файл не найден, убедитесь, что вы используете

сборка докера —no-cache

I get an error when I uncompress my tar.

I do this:

tar xvf VM_DECOMPTES.tar

and after some time I get the following error:

tar: short read

What is going wrong here?

tar: unrecognized option `–version’ BusyBox
v1.9.1-VMware-visor-klnext-2965 (2010-04-19 12:53:48 PDT) multi-call
binary

Usually this message appears if the tar archive is incomplete. If you run tar tvf ./VM_DECOMPTEST.tar it will check the tar file for inconsistencies.

I suspect that your tarfile is corrupted or truncated.

The header of a tarfile contains a size field that contains the length of the file.¹ If the actual file is shorter than the header says it should be, tar will try to read past the filesystem end of file and get back a read shorter than it expected, thus generating the message you see.

¹ This feature dates to when tar was used primarily for Tape ARchiving where you could only know the length of a “file” by reading until you hit an EOF marker on the tape. It was retained for backwards compatibility and also provides a nice (if kinda cheap) check on header and file consistency.

Answered By: msw

This may be due to the version of tar that you’re running, especially if you are unable to reproduce this issue with GNU tar.

You can build a new version of busybox for your platform by running something like the following commands:

$ wget https://busybox.net/downloads/busybox-1.31.0.tar.bz2
$ tar xjf busybox-1.31.0.tar.bz2
$ cd busybox-1.31.0
$ LDFLAGS=--static make -j16  # if applicable: CROSS_COMPILE=...-linux-gnu-

In particular, there seems to be some sort of bug in unpacking with busybox v1.22.1 (other versions too, perhaps) that has been fixed by v1.31.0.

Понравилась статья? Поделить с друзьями:
  • Tasklist ошибка сервер rpc недоступен
  • Tap2go ошибка небезопасная среда
  • Tamriel trade centre ошибка
  • Talaris ev 8626 ошибка rfeed
  • Tamper ошибка на терминале