“E:需要重新安装软件包代码,但我找不到它的存档。”

“E:需要重新安装软件包代码,但我找不到它的存档。”

每次我尝试安装新的应用程序或软件(例如:git、gcc 运行 c 等)时,都会抛出上述错误。如下所示:

(base) devi@devi-s200164:~$ sudo apt install gcc
[sudo] password for devi: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package code needs to be reinstalled, but I can't find an archive for it.

(base) devi@devi-s200164:~$ sudo apt-get install git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package code needs to be reinstalled, but I can't find an archive for it.

(base) devi@devi-s200164:~$ sudo apt install python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package code needs to be reinstalled, but I can't find an archive for it.
(base) devi@devi-s200164:~$ sudo dpkg --remove --force-all hl1440lpr 
[sudo] password for devi: 
dpkg: warning: ignoring request to remove hl1440lpr which isn't installed (base) 
devi@devi-s200164:~$ sudo rm -i /var/lib/dpkg/info/hl1440lpr.* rm: 
cannot remove '/var/lib/dpkg/info/hl1440lpr.*': No such file or directory (base) 
devi@devi-s200164:~$ sudo dpkg --remove --force-remove-reinstreq hl1440lpr 
dpkg: warning: ignoring request to remove hl1440lpr which isn't installed 

我的笔记本电脑的操作系统版本是 Ubuntu 22.04。当我尝试打开“软件和更新”时,它没有打开,也就是说,每当我单击该应用程序时,它都会返回到我的桌面页面。这可能是上述错误的原因吗?如果是这个原因,如何解决它?

相关内容