我使用的是 Ubuntu 18.04,我尝试将 libc6 从版本 2.27 升级到 2.29,但我最终破坏了包系统。我无法修复,因为当我尝试使用修复命令时,它总是显示系统中的大量软件包将被删除。
Synaptic 显示这些软件包已损坏:
- glibc 文档 2.27-3
- libc-dev-bin 2.27-3
- libc6 2.29-0
- libc6-dbg 2.27-3
- libc6-dev 2.27-3
- libc6:i386 2.27-3
我怎么破的?我从https://packages.ubuntu.com/下载了以下软件包
- glibc-doc_2.29-0ubuntu2_all.deb
- glibc-source_2.29-0ubuntu2_all.deb
- libc6_2.29-0ubuntu2_amd64.deb
- libc6-amd64_2.29-0ubuntu2_i386.deb
- libc-bin_2.29-0ubuntu2_amd64.deb
- locales_2.29-0ubuntu2_all.deb
我试图通过 dpkg 一个一个地安装它们,但由于依赖错误而没有工作,最后我使用了这个命令:
sudo dpkg -i libc-bin_2.29-0ubuntu2_amd64.deb libc6_2.29-0ubuntu2_amd64.deb libc6-amd64_2.29-0ubuntu2_i386.deb
之后,我在提示中说“是”,提示需要重新启动一些程序,如 postgres。
然后我看到了损坏的包错误。
sudo apt update
没有错误。当我尝试修复时,它显示几乎所有需要删除的东西:
sudo apt install -f
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:
alex freeglut3 freeglut3-dev happy hscolour libbsd-dev libdrm-dev libffi-dev
libgl1-mesa-dev libgles1 libglu1-mesa-dev libglvnd-core-dev libglvnd-dev
libgmp-dev libgmpxx4ldbl libopengl0 libtinfo-dev libx11-xcb-dev
libx11-xcb1:i386 libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev
libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev
libxcb-sync-dev libxcb-xfixes0-dev libxdamage-dev libxext-dev libxfixes-dev
libxi-dev libxmu-dev libxmu-headers libxshmfence-dev libxxf86vm-dev
linux-headers-4.18.0-17 linux-headers-4.18.0-17-generic
linux-image-4.18.0-17-generic linux-libc-dev linux-modules-4.18.0-17-generic
linux-modules-extra-4.18.0-17-generic mesa-common-dev x11proto-damage-dev
x11proto-fixes-dev x11proto-xext-dev x11proto-xf86vidmode-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
glibc-doc-reference
The following packages will be REMOVED:
build-essential cabal-install g++ g++-7 ghc haskell-platform libbsd0:i386
libc-dev-bin libc6:i386 libc6-amd64:i386 libc6-dbg libc6-dev
libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386
libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386
libffi6:i386 libgcc1:i386 libghc-async-dev libghc-attoparsec-dev
libghc-call-stack-dev libghc-case-insensitive-dev libghc-fgl-dev
libghc-fixed-dev libghc-gluraw-dev libghc-glut-dev libghc-half-dev
libghc-hashable-dev libghc-haskell-src-dev libghc-html-dev libghc-http-dev
libghc-hunit-dev libghc-integer-logarithms-dev libghc-mtl-dev
libghc-network-dev libghc-network-uri-dev libghc-objectname-dev
libghc-opengl-dev libghc-openglraw-dev libghc-parallel-dev
libghc-parsec3-dev libghc-primitive-dev libghc-quickcheck2-dev
libghc-random-dev libghc-regex-base-dev libghc-regex-compat-dev
libghc-regex-posix-dev libghc-scientific-dev libghc-split-dev
libghc-statevar-dev libghc-stm-dev libghc-syb-dev libghc-text-dev
libghc-tf-random-dev libghc-unordered-containers-dev libghc-vector-dev
libghc-zlib-dev libgl1:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386
libglapi-mesa:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386
libllvm7:i386 libncurses5-dev libnvidia-compute-418:i386
libnvidia-decode-418:i386 libnvidia-encode-418:i386 libnvidia-fbc1-418:i386
libnvidia-gl-418:i386 libnvidia-ifr1-418:i386 libpciaccess0:i386
libsensors4:i386 libstdc++-7-dev libstdc++6:i386 libtinfo5:i386
libx11-6:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386
libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386
libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
libxshmfence1:i386 libxxf86vm1:i386 zlib1g:i386 zlib1g-dev
The following NEW packages will be installed:
glibc-doc-reference
0 upgraded, 1 newly installed, 97 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 5.483 kB of archives.
After this operation, 1.303 MB disk space will be freed.
Do you want to continue? [Y/n]