在 Debian 7 上安装 apt-get 时出错

在 Debian 7 上安装 apt-get 时出错

我想安装 php7.3,并且在我想在服务器上安装的每个包上,我收到以下错误:

我尝试了几种方法,但也许有人可以建议我解决问题。谢谢你!

root@h2538838:/etc/apt/sources.list.d# apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Breaks: binutils (< 2.26) but 2.22-8+deb7u3 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

编辑:

我尝试卸载 libc6-dev,但这会安装其他软件包,从而失败。

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  geoip-database libc-dev-bin libgeoip1 libpython2.7 libsqlite0 mc-data pkg-config python-libxml2 python-pycurl python-rpm python-sqlite python-sqlitecachec python-urlgrabber
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libc-dev-bin libc6 libdbus-1-3 libgcrypt20 libgpg-error0 liblz4-1 libnih-dbus1 libnih1 libssl-dev libssl1.1 libsystemd0 zlib1g
Suggested packages:
  glibc-doc libc-l10n locales rng-tools libssl-doc
Recommended packages:
  libidn2-0 dbus libgpg-error-l10n
The following packages will be REMOVED:
  libc6-dev libjpeg8-dev libpng12-dev zlib1g-dev
The following NEW packages will be installed:
  libgcrypt20 liblz4-1 libssl1.1 libsystemd0
The following packages will be upgraded:
  libc-dev-bin libc6 libdbus-1-3 libgpg-error0 libnih-dbus1 libnih1 libssl-dev zlib1g
8 upgraded, 4 newly installed, 4 to remove and 473 not upgraded.
Need to get 0 B/7931 kB of archives.
After this operation, 8824 kB disk space will be freed.
Do you want to continue [Y/n]?

……

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "de_DE.utf8",
        LC_ALL = "de_DE.utf8",
        LANG = "de_DE.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
E: /var/cache/apt/archives/libssl-dev_1.1.1c-1_i386.deb not a valid DEB package.
E: Prior errors apply to /var/cache/apt/archives/libssl-dev_1.1.1c-1_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libc-dev-bin_2.28-10_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libgpg-error0_1.36-7_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libgcrypt20_1.8.4-5_i386.deb
E: Prior errors apply to /var/cache/apt/archives/liblz4-1_1.8.3-1_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libdbus-1-3_1.12.16-1_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libnih-dbus1_1.0.3-10+b2_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libnih1_1.0.3-10+b2_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libc6_2.28-10_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libsystemd0_241-7_i386.deb
E: Prior errors apply to /var/cache/apt/archives/libssl1.1_1.1.1c-1_i386.deb
E: Prior errors apply to /var/cache/apt/archives/zlib1g_1%3a1.2.11.dfsg-1+b1_i386.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg-deb: error: archive '/var/cache/apt/archives/libssl-dev_1.1.1c-1_i386.deb' contains not understood data member control.tar.xz, giving up
dpkg: error processing /var/cache/apt/archives/libssl-dev_1.1.1c-1_i386.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libssl-dev_1.1.1c-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

相关内容