Debian Wheezy apt-get problems

I'm trying to install libncurses (and a few other applications), but I run across these errors:

ghost:/# apt-get install libncurses5-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  libasound2-plugins: Depends: libavcodec53 (>= 6:0.8.2-2) but it is not going to be installed or
                               libavcodec-extra-53 (>= 6:0.8.2-2) but it is not going to be installed
                      Depends: libavutil51 (>= 6:0.8.2-2) but it is not going to be installed
                      Depends: libpulse0 (>= 0.99.1) but 0.9.21-3 is to be installed
  libncurses5-dev: Depends: libtinfo-dev (= 5.9-10) but it is not going to be installed
                   Depends: ncurses-bin (= 5.9-10) but 5.7+20100313-4 is to be installed
  mplayer: Depends: libavcodec53 (>= 6:0.8.3-1~) but it is not going to be installed or
                    libavcodec-extra-53 (>= 6:0.8.17) but it is not going to be installed
           Depends: libavformat53 (>= 6:0.8.3-1~) but it is not going to be installed
           Depends: libavutil51 (>= 6:0.8.3-1~) but it is not going to be installed
           Depends: libdvdnav4 (>= 4.2.0+20120524) but it is not going to be installed
           Depends: libpostproc52 (>= 6:0.8.3-1~) but it is not going to be installed
           Depends: libpulse0 (>= 0.99.1) but 0.9.21-3 is to be installed
           Depends: libswscale2 (>= 6:0.8.3-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

And then:

ghost:/# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libswscale0 libavutil49 libpostproc51 libavformat52 libavcodec52 libaudio2
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libavcodec53 libavformat53 libavutil51 libdvdnav4 libpostproc52 libpulse0 libswscale2
Suggested packages:
  libdvdcss2 pulseaudio
The following NEW packages will be installed:
  libavcodec53 libavformat53 libavutil51 libdvdnav4 libpostproc52 libswscale2
The following packages will be upgraded:
  libpulse0
1 upgraded, 6 newly installed, 0 to remove and 195 not upgraded.
55 not fully installed or removed.
Need to get 0B/6999kB of archives.
After this operation, 24.5MB of additional disk space will be used.
Do you want to continue [Y/n]? y

And then

WARNING: The following packages cannot be authenticated!
  libavutil51 libavcodec53 libpulse0 libavformat53 libdvdnav4 libpostproc52 libswscale2
Install these packages without verification [y/N]? y
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 19252 files and directories currently installed.)
Unpacking libavutil51 (from .../libavutil51_6%3a0.8.21-0+deb7u1_armel.deb) ...
dpkg-deb: file `/var/cache/apt/archives/libavutil51_6%3a0.8.21-0+deb7u1_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libavutil51_6%3a0.8.21-0+deb7u1_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Unpacking libavcodec53 (from .../libavcodec53_6%3a0.8.21-0+deb7u1_armel.deb) ...
dpkg-deb: file `/var/cache/apt/archives/libavcodec53_6%3a0.8.21-0+deb7u1_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libavcodec53_6%3a0.8.21-0+deb7u1_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Preparing to replace libpulse0 0.9.21-3 (using .../libpulse0_2.0-6.1_armel.deb) ...
Unpacking replacement libpulse0 ...
dpkg-deb: file `/var/cache/apt/archives/libpulse0_2.0-6.1_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libpulse0_2.0-6.1_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Unpacking libavformat53 (from .../libavformat53_6%3a0.8.21-0+deb7u1_armel.deb) ...
dpkg-deb: file `/var/cache/apt/archives/libavformat53_6%3a0.8.21-0+deb7u1_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libavformat53_6%3a0.8.21-0+deb7u1_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Unpacking libdvdnav4 (from .../libdvdnav4_4.2.0+20120524-2_armel.deb) ...
dpkg-deb: file `/var/cache/apt/archives/libdvdnav4_4.2.0+20120524-2_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libdvdnav4_4.2.0+20120524-2_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Unpacking libpostproc52 (from .../libpostproc52_6%3a0.8.21-0+deb7u1_armel.deb) ...
dpkg-deb: file `/var/cache/apt/archives/libpostproc52_6%3a0.8.21-0+deb7u1_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libpostproc52_6%3a0.8.21-0+deb7u1_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Unpacking libswscale2 (from .../libswscale2_6%3a0.8.21-0+deb7u1_armel.deb) ...
dpkg-deb: file `/var/cache/apt/archives/libswscale2_6%3a0.8.21-0+deb7u1_armel.deb' contains ununderstood data member data.tar.xz     , giving up
dpkg: error processing /var/cache/apt/archives/libswscale2_6%3a0.8.21-0+deb7u1_armel.deb (--unpack):
 subprocess dpkg-deb --fsys-tarfile returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libavutil51_6%3a0.8.21-0+deb7u1_armel.deb
 /var/cache/apt/archives/libavcodec53_6%3a0.8.21-0+deb7u1_armel.deb
 /var/cache/apt/archives/libpulse0_2.0-6.1_armel.deb
 /var/cache/apt/archives/libavformat53_6%3a0.8.21-0+deb7u1_armel.deb
 /var/cache/apt/archives/libdvdnav4_4.2.0+20120524-2_armel.deb
 /var/cache/apt/archives/libpostproc52_6%3a0.8.21-0+deb7u1_armel.deb
 /var/cache/apt/archives/libswscale2_6%3a0.8.21-0+deb7u1_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
ghost:/# 

Can anyone help?

TIA.

It looks like you’re encountering issues because your version of dpkg doesn’t support .xz compressed files, which are used in the newer .deb packages.

If you cannot Update dpkg to a version that supports .xz archives and the issue persists, you might need to manually download and install dpkg from a more recent repository or try updating to a newer distribution if possible. This should enable support for the .xz format and allow the installations to proceed without errors.

Ok. Thank you for your input.
That said, that my current dpkg cannot install .xz archives, how would I upgrade to Debian Jessie with a broken dpkg? I cannot compile a working dpkg, So, how would I go about upgrading?

Thank you.

You can try manually downloading and installing a compatible dpkg version without using dpkg itself.

Any idea where I can find it? I need the "armel" architecture version. It seems to be difficult to find.

Thank you, sir.

Try here:

http://archive.debian.org/debian/pool/main/d/dpkg/

That is the problem, of course, when you are running operations on any OS which is long past end-of-life:

Wheezy also had benefited from Long Term Support (LTS) until the end of May 2018. The LTS was limited to i386, amd64, armel and armhf.

Since your system is 6 years past EOL, you should consider migrating to a new server which is not EOL, to be candid and honest.

Yes. Thank you. I was able to get dpkg to a version that is working. However, I still get an error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  alpine alsa-base alsa-utils apt apt-utils aptitude base-files binutils bitlbee ca-certificates centerim console-setup cpp cpp-4.4 dpkg esound-common fbi gawk gcc gcc-4.4 gcc-4.4-base ghostscript
  gstreamer0.10-plugins-base ifupdown initscripts iputils-ping irssi keyboard-configuration libaprutil1 libc-bin libc-dev-bin libc6 libc6-dev libcups2 libcupsimage2 libcurl3-gnutls libcwidget3 libdevmapper1.02.1 libesd0
  libgcc1 libgl1-mesa-glx libgomp1 libgssapi-krb5-2 libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 libjack-jackd2-0 libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.4-2 liblocale-gettext-perl libmpfr4 libopenal1
  libpam-modules libsasl2-2 libsdl1.2debian libsigc++-2.0-0c2a libsmbclient libsox-fmt-alsa libsox-fmt-base libstdc++6 libtext-charwidth-perl libtext-iconv-perl libtiff4 libxml2 man-db mc menu module-init-tools mount
  netbase nmap ntpdate openssl oss-compat oss4-base passwd perl perl-base perl-modules procps python python-dbus python-gobject python-minimal sox sysvinit tmux update-inetd usbutils wpasupplicant xz-utils
The following packages will be upgraded:
  alsa-oss bsdmainutils bzip2 dialog elinks-lite file gftp-common gftp-text htop less libaa1 libaudio2 libavahi-client3 libavahi-common3 libbz2-1.0 libdbus-glib-1-2 libdrm2 libdvdread4 libexif12 libfaad2 libffi5
  libfontenc1 libfribidi0 libgcrypt11 libgdbm3 libglib2.0-0 libgpg-error0 libgpgme11 libidn11 libiw30 libjasper1 libjpeg62 libkeyutils1 libltdl7 liblua5.1-0 liblzo2-2 libmagic1 libmenu-cache1 libmikmod2 libmpg123-0
  libnewt0.52 libnl1 libpam0g libpaper1 libpcap0.8 libpcre3 libpcsclite1 libpixman-1-0 libpopt0 libreadline5 libreadline6 libsdl-gfx1.2-4 libsdl-mixer1.2 libselinux1 libsepol1 libsmpeg0 libsqlite3-0 libss2 libsysfs2
  libtalloc2 libtasn1-3 libudev0 libusb-0.1-4 libvisual-0.4-0 libwavpack1 libwbclient0 libxaw7 libxdamage1 libxfixes3 libxinerama1 libxkbfile1 libxmu6 libxpm4 libxt6 libxv1 libxxf86dga1 libxxf86vm1 linux-libc-dev lzma
  mikmod minicom mpg123 nano nap nethack-common nethack-console psmisc screen shared-mime-info splitvt ttf-dejavu-core udev wget whiptail xkb-data xserver-xfbdev
96 upgraded, 0 newly installed, 0 to remove and 92 not upgraded.
1 not fully installed or removed.
Need to get 0B/20.6MB of archives.
After this operation, 2713kB disk space will be freed.
Do you want to continue [Y/n]? 
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  bzip2 libbz2-1.0 libpam0g libselinux1 libsepol1 libss2 libgpg-error0 libgcrypt11 libgdbm3 libnewt0.52 libpopt0 libreadline6 libtasn1-3 udev libudev0 libusb-0.1-4 libidn11 libkeyutils1 file libmagic1 libpcre3 alsa-oss
  libaa1 libxt6 libaudio2 libavahi-common3 libavahi-client3 libffi5 libglib2.0-0 libdbus-glib-1-2 libdrm2 libdvdread4 libexif12 libfaad2 libfontenc1 libfribidi0 libiw30 libjasper1 libjpeg62 libltdl7 liblua5.1-0 liblzo2-2
  libmikmod2 libmpg123-0 libnl1 libpaper1 libpcap0.8 libpcsclite1 libpixman-1-0 libreadline5 libsdl-gfx1.2-4 libsdl-mixer1.2 libsmpeg0 libsqlite3-0 libsysfs2 libtalloc2 libvisual-0.4-0 libwavpack1 libwbclient0 libxmu6
  libxpm4 libxaw7 libxfixes3 libxdamage1 libxinerama1 libxkbfile1 libxv1 libxxf86dga1 libxxf86vm1 ttf-dejavu-core libmenu-cache1 bsdmainutils nano wget whiptail less dialog gftp-text gftp-common htop libgpgme11
  linux-libc-dev lzma mikmod minicom mpg123 nap nethack-console nethack-common psmisc screen shared-mime-info splitvt xserver-xfbdev elinks-lite xkb-data
Install these packages without verification [y/N]? 
Install these packages without verification [y/N]? y
Extracting templates from packages: 100%
Preconfiguring packages ...
Can not write log, openpty() failed (/dev/pts not mounted?)
Setting up util-linux (2.20.1-5.3) ...
Can't locate Dpkg.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/sbin/update-alternatives line 16.
BEGIN failed--compilation aborted at /usr/sbin/update-alternatives line 16.
dpkg: error processing util-linux (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thank you for your help! You are indeed The Founder.

It's good if you read your error messages and think about them; what they are, and why you have time (before posting).

The error in your post suggests a missing or broken Perl module, Dpkg.pm, which is essential for dpkg operations.

Specifically, this issue is affecting update-alternatives and preventing dpkg from correctly configuring util-linux.

Normally errors messages are very useful; and when you are running a version of Debian which is 6 years past EOL, you cannot expect any of the automated processes to work flawlessly.

So, you must either (1) upgrade to a new server version running a fully supported version of Debian / Linux, or (2) you will have to (struggle to) fix every error in your obsolete version of Debian one-error-at-a-time, @ignatius

Running unsupported software 6 years past end-of-life is not a good idea, for anyone. If you want an easier life, you need to run your apps on a supported, modern version of Debian or Linux.

1 Like