Ubuntu 22.04 Jammy,libc6 更新後中斷。如何恢復半安裝的 libc6

Ubuntu 22.04 Jammy,libc6 更新後中斷。如何恢復半安裝的 libc6

更新後我的 libc6 壞了,特別是/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2被刪除了。我必須從即時發行版啟動才能將其複製回來,因為沒有命令不再起作用(現在我已經吸取了教訓,所以我保持 root shell 打開,以便我可以使用 busybox 將其複製回來而無需重新啟動)。

每次我嘗試執行sudo apt update && sudo apt upgrade相同的問題時都會發生,並且我需要恢復 ld-linux-x86-64.so.2 檔案。我嘗試過不同的事情:

  • sudo apt install -f
  • sudo dpkg --configure -a
  • sudo apt autoclean
  • sudo apt clean
  • 刪除了文件/var/lib/dpkg/status

但沒有任何效果,同樣的問題不斷發生。

安裝的Libc6版本是2.35-0ubuntu3,但它聲稱要安裝2.35-0ubuntu3.3。dpkg -l目前的命令會產生以下結果:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name              Version               Architecture Description
+++-=================-=====================-============-===============================================
ii  gcc-12-base:amd64 12.3.0-1ubuntu1~22.04 amd64        GCC, the GNU Compiler Collection (base package)
iHR libc6:amd64       2.35-0ubuntu3.3       amd64        (no description available)
iU  libcrypt1:amd64   1:4.4.27-1            amd64        libcrypt shared library

軟體包 libc6:amd64 已安裝一半,需要重新安裝。奇怪的是,沒有可用的描述。

的輸出sudo apt upgrade是:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

具有未滿足依賴項的包列表為空。啟動sudo apt --fix-broken install以錯誤結束並且檔案ld-linux-x86-64.so.2被刪除。

的輸出sudo dpkg --configure -a是:

dpkg: dependency problems prevent configuration of libcrypt1:amd64:
 libcrypt1:amd64 depends on libc6 (>= 2.25); however:
  Package libc6:amd64 is not installed.

dpkg: error processing package libcrypt1:amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libcrypt1:amd64

的輸出sudo apt update是:

Hit:1 http://deb.debian.org/debian bullseye InRelease                                                                                                                                    
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease                                                                                                             
Get:3 http://download.opensuse.org/repositories/home:/Alexx2000/xUbuntu_22.04  InRelease [1.529 B]                                                                                       
Hit:4 http://ppa.launchpad.net/linuxuprising/java/ubuntu jammy InRelease                                                                                                                 
Hit:5 http://deb.debian.org/debian bullseye-updates InRelease                                                                                                                            
Hit:6 https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                                                                    
Hit:7 http://ppa.launchpad.net/wereturtle/ppa/ubuntu jammy InRelease                                                                                                                     
Hit:8 https://download.docker.com/linux/ubuntu jammy InRelease                                                                                                                           
Hit:9 https://ppa.launchpadcontent.net/freecad-maintainers/freecad-stable/ubuntu jammy InRelease                                                                                         
Hit:10 http://security.ubuntu.com/ubuntu jammy-security InRelease                                                                                                                        
Hit:11 https://packages.microsoft.com/repos/edge stable InRelease                                                                                                                        
Get:12 https://mega.nz/linux/repo/xUbuntu_20.04 ./ InRelease [2.961 B]                                                                                                                   
Hit:13 https://ppa.launchpadcontent.net/libreoffice/ppa/ubuntu jammy InRelease                                                                                                           
Hit:14 http://it.archive.ubuntu.com/ubuntu jammy InRelease                                                                                                         
Hit:15 http://it.archive.ubuntu.com/ubuntu jammy-updates InRelease                                                                           
Ign:16 http://gmusicbrowser.org/deb ./ InRelease                                                                                                   
Hit:17 http://it.archive.ubuntu.com/ubuntu jammy-backports InRelease                                                                               
Get:18 http://gmusicbrowser.org/deb ./ Release [1.722 B]                                                                     
Hit:19 https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium InRelease                                                       
Hit:20 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy InRelease                         
Hit:22 https://ppa.launchpadcontent.net/spvkgn/deadbeef/ubuntu jammy InRelease                           
Hit:21 https://packagecloud.io/AtomEditor/atom/any any InRelease                                         
Fetched 6.212 B in 4s (1.511 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

apt list --upgradable顯示:

Listing... Done
libc6/jammy-updates 2.35-0ubuntu3.3 amd64 [upgradable from: 2.35-0ubuntu3.3]
N: There are 4 additional versions. Please use the '-a' switch to see them.

我在網上搜索了解決方案並嘗試了其他一些方法但無濟於事,我現在不知道該怎麼辦。

如何將libc6恢復到健康狀態?

相關內容