Skip to main content
Add descriptions of the main steps.
Source Link
JohnGH
  • 336
  • 2
  • 5
/var/cache/apt/archives/tar_(version-release_platform).deb 

e.g.:

# ls -t /var/cache/apt/archives/tar_*|head -1 

/var/cache/apt/archives/tar_(versiontar_1.26-release_platform)4_amd64.deb

e.g.:

# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb

This is how I fixed my system:

Find the latest version on your system:

root@host:~# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb 

Create a temporary working area and unpack the .deb archive:

root@host:~# mkdir fix_tar root@host:~# cd fix_tar root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb 

Unpack the data.tar.gz file to find the new tar binary:

root@host:~/fix_tar# ls -l total 972 -rw-r--r-- 1 root root 2536 2012-02-03 12:20 control.tar.gz -rw-r--r-- 1 root root 978996 2012-02-03 12:20 data.tar.gz -rw-r--r-- 1 root root 4 2012-02-03 12:20 debian-binary root@host:~/fix_tar# tar xzf data.tar.gz root@host:~/fix_tar# find * -name tar bin/tar usr/share/doc/tar usr/lib/mime/packages/tar 

Check the existing version on your system:

root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.20 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb 

Backup the old version in case something goes horribly wrong and you need it back:

root@host:~/fix_tar# mv /bin/tar /bin/tar_1.20 

Put the new copy in place:

root@host:~/fix_tar# mv ./bin/tar /bin/tar 

Check the new version:

root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. 

You're done! :-)

/var/cache/apt/archives/tar_(version-release_platform).deb

e.g.:

# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb

This is how I fixed my system:

root@host:~# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb root@host:~# mkdir fix_tar root@host:~# cd fix_tar root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb root@host:~/fix_tar# ls -l total 972 -rw-r--r-- 1 root root 2536 2012-02-03 12:20 control.tar.gz -rw-r--r-- 1 root root 978996 2012-02-03 12:20 data.tar.gz -rw-r--r-- 1 root root 4 2012-02-03 12:20 debian-binary root@host:~/fix_tar# tar xzf data.tar.gz root@host:~/fix_tar# find * -name tar bin/tar usr/share/doc/tar usr/lib/mime/packages/tar root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.20 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb root@host:~/fix_tar# mv /bin/tar /bin/tar_1.20 root@host:~/fix_tar# mv ./bin/tar /bin/tar root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. 
/var/cache/apt/archives/tar_(version-release_platform).deb 

e.g.:

# ls -t /var/cache/apt/archives/tar_*|head -1 

/var/cache/apt/archives/tar_1.26-4_amd64.deb

This is how I fixed my system:

Find the latest version on your system:

root@host:~# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb 

Create a temporary working area and unpack the .deb archive:

root@host:~# mkdir fix_tar root@host:~# cd fix_tar root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb 

Unpack the data.tar.gz file to find the new tar binary:

root@host:~/fix_tar# ls -l total 972 -rw-r--r-- 1 root root 2536 2012-02-03 12:20 control.tar.gz -rw-r--r-- 1 root root 978996 2012-02-03 12:20 data.tar.gz -rw-r--r-- 1 root root 4 2012-02-03 12:20 debian-binary root@host:~/fix_tar# tar xzf data.tar.gz root@host:~/fix_tar# find * -name tar bin/tar usr/share/doc/tar usr/lib/mime/packages/tar 

Check the existing version on your system:

root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.20 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. 

Backup the old version in case something goes horribly wrong and you need it back:

root@host:~/fix_tar# mv /bin/tar /bin/tar_1.20 

Put the new copy in place:

root@host:~/fix_tar# mv ./bin/tar /bin/tar 

Check the new version:

root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. 

You're done! :-)

Source Link
JohnGH
  • 336
  • 2
  • 5

You may not need to worry about downloading the tar package.

Chances are, to get to this point because you were in the middle of an upgrade, and your package management system will have already downloaded the latest tar package for you, so it will be waiting for you in:

/var/cache/apt/archives/tar_(version-release_platform).deb

e.g.:

# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb

This is how I fixed my system:

root@host:~# ls -t /var/cache/apt/archives/tar_*|head -1 /var/cache/apt/archives/tar_1.26-4_amd64.deb root@host:~# mkdir fix_tar root@host:~# cd fix_tar root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb root@host:~/fix_tar# ls -l total 972 -rw-r--r-- 1 root root 2536 2012-02-03 12:20 control.tar.gz -rw-r--r-- 1 root root 978996 2012-02-03 12:20 data.tar.gz -rw-r--r-- 1 root root 4 2012-02-03 12:20 debian-binary root@host:~/fix_tar# tar xzf data.tar.gz root@host:~/fix_tar# find * -name tar bin/tar usr/share/doc/tar usr/lib/mime/packages/tar root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.20 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. root@host:~/fix_tar# ar x /var/cache/apt/archives/tar_1.26-4_amd64.deb root@host:~/fix_tar# mv /bin/tar /bin/tar_1.20 root@host:~/fix_tar# mv ./bin/tar /bin/tar root@host:~/fix_tar# /bin/tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. 

I was then able to carry on with another:

root@host:~# aptitude update root@host:~# aptitude safe-upgrade