“Tar: opsi tidak dikenal - peringatan” selama 'apt-get install'

10

Saya baru saja menjalankan apt-get upgradedebian 5 vps saya dan saya mendapatkan kesalahan ini:

tar: opsi tidak dikenal `--warning = no-timestamp '

Sekarang ketika saya mencoba menginstal paket lain misalnya: imagemagick saya mendapatkan kesalahan yang sama:

li197-162:~# apt-get install imagemagick
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  pkg-config comerr-dev libssh2-1-dev libpcre3-dev libdb4.6-dev libsqlite3-dev libmysqlclient15-dev libldap2-dev libpcrecpp0 libexpat1-dev libpq5 libidn11-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  fontconfig-config imagemagick-common libfontconfig1 libfreetype6 libglib2.0-0 libice6 libjasper1 libjpeg8 liblcms1 liblqr-1-0 libltdl7 libmagickcore4 libmagickwand4 libpng12-0 libsm6 libtiff4
  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxml2 libxml2-dev libxt6 ttf-dejavu-core x11-common
Suggested packages:
  imagemagick-doc autotrace cups-bsd lpr lprng enscript ffmpeg gimp gnuplot grads hp2xx html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin transfig xdg-utils libjasper-runtime
  liblcms-utils
Recommended packages:
  libmagickcore4-extra ghostscript netpbm ufraw-batch libglib2.0-data shared-mime-info gsfonts xml-core
The following NEW packages will be installed:
  fontconfig-config imagemagick imagemagick-common libfontconfig1 libfreetype6 libice6 libjasper1 libjpeg8 liblcms1 liblqr-1-0 libltdl7 libmagickcore4 libmagickwand4 libpng12-0 libsm6 libtiff4
  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxt6 ttf-dejavu-core x11-common
The following packages will be upgraded:
  libglib2.0-0 libxml2 libxml2-dev
3 upgraded, 25 newly installed, 0 to remove and 190 not upgraded.
Need to get 0B/11.2MB of archives.
After this operation, 22.4MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Preconfiguring packages ...
x11-common template parse error: Template parse error near `[email protected]: Samo glavni korisnik, Samo za korisnike konzole, Svako', in stanza #1 of /tmp/x11-common.template.65052

tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libfreetype6_2.4.6-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/ttf-dejavu-core_2.33-2_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/fontconfig-config_2.8.0-3_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libfontconfig1_2.8.0-3_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/x11-common_1%3a7.6+9_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libice6_2%3a1.0.7-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libpng12-0_1.2.46-3_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libsm6_2%3a1.2.0-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libjpeg8_8c-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libtiff4_3.9.5-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxau6_1%3a1.0.6-3_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxdmcp6_1%3a1.1.0-3_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxcb1_1.7-3_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libx11-data_2%3a1.4.4-2_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libx11-6_2%3a1.4.4-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxext6_2%3a1.3.0-3_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxt6_1%3a1.1.1-2_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-4_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libxml2_2.7.8.dfsg-4_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.28.6-1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/liblcms1_1.19.dfsg-1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/liblqr-1-0_0.4.1-1.1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libltdl7_2.4-4_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libjasper1_1.900.1-10_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/imagemagick-common_8%3a6.6.9.7-5_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libmagickcore4_8%3a6.6.9.7-5+b1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/libmagickwand4_8%3a6.6.9.7-5+b1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
tar: unrecognized option `--warning=no-timestamp'
Try `tar --help' or `tar --usage' for more information.
dpkg-deb: error: subprocess tar returned error exit status 64
dpkg: error processing /var/cache/apt/archives/imagemagick_8%3a6.6.9.7-5+b1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libfreetype6_2.4.6-2_i386.deb
 /var/cache/apt/archives/ttf-dejavu-core_2.33-2_all.deb
 /var/cache/apt/archives/fontconfig-config_2.8.0-3_all.deb
 /var/cache/apt/archives/libfontconfig1_2.8.0-3_i386.deb
 /var/cache/apt/archives/x11-common_1%3a7.6+9_all.deb
 /var/cache/apt/archives/libice6_2%3a1.0.7-2_i386.deb
 /var/cache/apt/archives/libpng12-0_1.2.46-3_i386.deb
 /var/cache/apt/archives/libsm6_2%3a1.2.0-2_i386.deb
 /var/cache/apt/archives/libjpeg8_8c-2_i386.deb
 /var/cache/apt/archives/libtiff4_3.9.5-2_i386.deb
 /var/cache/apt/archives/libxau6_1%3a1.0.6-3_i386.deb
 /var/cache/apt/archives/libxdmcp6_1%3a1.1.0-3_i386.deb
 /var/cache/apt/archives/libxcb1_1.7-3_i386.deb
 /var/cache/apt/archives/libx11-data_2%3a1.4.4-2_all.deb
 /var/cache/apt/archives/libx11-6_2%3a1.4.4-2_i386.deb
 /var/cache/apt/archives/libxext6_2%3a1.3.0-3_i386.deb
 /var/cache/apt/archives/libxt6_1%3a1.1.1-2_i386.deb
 /var/cache/apt/archives/libxml2-dev_2.7.8.dfsg-4_i386.deb
 /var/cache/apt/archives/libxml2_2.7.8.dfsg-4_i386.deb
 /var/cache/apt/archives/libglib2.0-0_2.28.6-1_i386.deb
 /var/cache/apt/archives/liblcms1_1.19.dfsg-1_i386.deb
 /var/cache/apt/archives/liblqr-1-0_0.4.1-1.1_i386.deb
 /var/cache/apt/archives/libltdl7_2.4-4_i386.deb
 /var/cache/apt/archives/libjasper1_1.900.1-10_i386.deb
 /var/cache/apt/archives/imagemagick-common_8%3a6.6.9.7-5_all.deb
 /var/cache/apt/archives/libmagickcore4_8%3a6.6.9.7-5+b1_i386.deb
 /var/cache/apt/archives/libmagickwand4_8%3a6.6.9.7-5+b1_i386.deb
 /var/cache/apt/archives/imagemagick_8%3a6.6.9.7-5+b1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
li197-162:~# 

Saya benar-benar tidak tahu apa yang salah dan bagaimana cara memperbaikinya. Apakah mungkin untuk membatalkan apt-get upgrade?

DanielZ
sumber
1
versi apa yang digunakan oleh daftar "apt-cache policy x11-common" untuk "Calon". Saya bertanya karena saya menduga Anda mungkin memutakhirkan server debian 5 (saat ini "oldstable") menggunakan sumber yang menunjuk pada debian 6 (saat ini "stabil").
rebus

Jawaban:

14

Saya baru saja mengalami masalah ini. Seperti yang disarankan Gilles, peningkatan taradalah jawabannya tetapi (kejutan kejutan) tartidak dapat ditingkatkan dengan cara biasa karena dpkgmemerlukan versi 1.23 atau lebih baru sebelum akan membongkar dan memasang tardeb terbaru . dpkgbenar-benar membutuhkan ketergantungan eksplisit untuk memastikan bahwa ketika versi yang lebih baru dpkgdiinstal, tarversi terbaru berjalan lebih dulu, tapi saya kira itu risiko dengan menggabungkan pengujian yang berbeda dan rilis yang tidak stabil dengan cara yang tidak didukung. Ini masih tidak diinginkan dan ini tampaknya cara yang malang untuk melumpuhkan suatu sistem.

Gagasan pertama saya adalah mencari biner terbaru tar di proyek GNU , tetapi sayangnya mereka hanya memiliki unduhan sumber, yang tidak membantu jika (seperti saya) Anda tidak memiliki berbagai alat kompilasi yang diinstal.

Jika Anda mengunduh tarbiner terbaru .debuntuk mencocokkan sistem Anda dari paket.debian.org dan menjatuhkannya ke tempat sementara di suatu tempat (hanya untuk dirapikan), Anda harus bisa masuk ke dalamnya dengan arperintah, misalnya ar x tar_1.26-2_amd64.debdalam kasus saya.
Kemudian bongkar data.tar.gzfile yang dihasilkan dengan perintah seperti tar zxvf data.tar.gz, menggunakan versi Anda sebelumnya yang ada tar, yang akan berfungsi selama Anda tidak mencoba dan melakukan sesuatu yang konyol seperti menggunakan --warningparameter yang tidak akan tersedia sampai versi 1.23. :) Ini kemudian akan membiarkan Anda mendapatkan di tarbiner, yang (dalam file data.tar.gz) mungkin di bin/tar.
Setelah melakukan ini, saya menambahkan path untuk biner itu ke depanPATHvariabel di shell saya, yang di shell bash saya bisa dilakukan dengan perintah export PATH=/root/temp/bin:$PATH, tetapi sesuaikan path agar pas di mana pun tarbiner baru sekarang duduk. Setelah itu, menjalankan dpkg --install tar_1.26-2_amd64.debkeajaiban yang biasa dilakukan , karena dpkgakan mencari di jalur dan menemukan tarbiner terbaru sebelum menemukan versi yang lebih lama di binjalur biasa .

izogi
sumber
Bekerja untukku. Bagi mereka yang mencapai halaman ini debugging menginstal Debian pada NSLU2, Anda memerlukan file .deb ini: packages.debian.org/squeeze/armel/tar/download Anda dapat menggunakan mesin lain (mac okay) untuk melakukan bit "ar" di atas . Saya menggunakan ikal untuk menyinkronkan ke NSLU saya. Terima kasih lagi izogi.
Mauvis Ledford
3

Saya tidak memiliki arsistem saya, jadi saya melakukan kludge mengerikan ini:

mv /bin/tar /bin/tar.real
echo "tar.real xpf -" >/bin/tar
chmod +x /bin/tar
cd /
# put in the correct path
dpkg-deb -x /var/cache/apt/archives/tar_1.26-4_armel.deb .
# check things are working and then
#rm /bin/tar.real
darkskiez
sumber
+1. Saya perlu menjawab pertanyaan ini ketika upgrade rusak cukup parah sehingga saya hanya memiliki 'tar' lama dan tidak ada 'ar' sama sekali. Terima kasih!
bignose
2

Anda mungkin tidak perlu khawatir mengunduh paket tar.

Kemungkinannya adalah, untuk sampai ke titik ini karena Anda berada di tengah-tengah peningkatan, dan sistem manajemen paket Anda akan sudah mengunduh paket tar terbaru untuk Anda, sehingga akan menunggu Anda di:

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

misalnya:

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

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

Inilah cara saya memperbaiki sistem saya:

Temukan versi terbaru di sistem Anda:

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

Buat area kerja sementara dan bongkar arsip .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

Buka paket file data.tar.gz untuk menemukan binary tar baru:

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

Periksa versi yang ada di sistem Anda:

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.

Cadangkan versi yang lama jika ada yang tidak beres dan Anda memerlukannya kembali:

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

Letakkan salinan baru di tempatnya:

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

Periksa versi baru:

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.

Kamu sudah selesai! :-)

Saya kemudian dapat melanjutkan dengan yang lain:

root@host:~# aptitude update
root@host:~# aptitude safe-upgrade
JohnGH
sumber
Jawaban yang fantastis!
mikewaters
1

Apakah Anda memiliki versi terbaru tar yang berguna di tempat lain (komputer lain)?
Jika demikian, lakukan scpsaja /usr/local/bin, dengan asumsi /usr/local/binmendahului reguler tardi jalur perintah Anda. Kemudian, Anda dapat meningkatkan:

apt-get install tar
santo
sumber
1

Mengganti tar dengan versi baru yang tersedia dari / var / cache ... benar-benar berfungsi untuk saya. Saya telah menghabiskan waktu yang lama untuk mencari tahu cara memperbaiki instalasi pemerasan debian saya untuk memungkinkan saya menginstal paket-paket baru setelah mengacaukan segalanya dengan mengutak-atik daftar sumber dan dengan bodohnya membiarkan webmin mencoba melakukan upgrade (kesalahan buruk). Terima kasih banyak untuk jawaban langsung ke poin dari kalian.

Tam Saunders
sumber