无法打开软件中心或更新管理器

无法打开软件中心或更新管理器

我目前正在运行 Xubuntu 12.04 64 位。我注意到我无法打开软件中心或更新管理器。

当我尝试打开更新管理器时,它报告说a problem occurred while checking for updates

启动软件中心时,会出现一条错误消息,告诉我

Failed to execute command "/usr/bin/software-center %u". 
Failed to execute child process "/usr/bin/software-center" (No such file or directory)

运行 sudo apt-get upgrade 会发现更多问题

david@david-laptop:~$ sudo apt-get upgrade
[sudo] password for david: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/689 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 575296 files and directories currently installed.)
Preparing to replace python-software-properties 0.82.7.7 (using .../python-software-properties_0.82.7.7_all.deb) ...
/var/lib/dpkg/info/python-software-properties.prerm: 6: /var/lib/dpkg/info/python-software-properties.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing /var/cache/apt/archives/python-software-properties_0.82.7.7_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/python-software-properties.postinst: 6: /var/lib/dpkg/info/python-software-properties.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to replace software-center 5.2.10 (using .../software-center_5.2.10_all.deb) ...
/var/lib/dpkg/info/software-center.prerm: 6: /var/lib/dpkg/info/software-center.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing /var/cache/apt/archives/software-center_5.2.10_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/software-center.postinst: 8: /var/lib/dpkg/info/software-center.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to replace software-properties-common 0.82.7.7 (using .../software-properties-common_0.82.7.7_all.deb) ...
/var/lib/dpkg/info/software-properties-common.prerm: 6: /var/lib/dpkg/info/software-properties-common.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing /var/cache/apt/archives/software-properties-common_0.82.7.7_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/software-properties-common.postinst: 6: /var/lib/dpkg/info/software-properties-common.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Preparing to replace software-properties-gtk 0.82.7.7 (using .../software-properties-gtk_0.82.7.7_all.deb) ...
/var/lib/dpkg/info/software-properties-gtk.prerm: 6: /var/lib/dpkg/info/software-properties-gtk.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg - trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing /var/cache/apt/archives/software-properties-gtk_0.82.7.7_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
No apport report written because MaxReports is reached already
                                                              /var/lib/dpkg/info/software-properties-gtk.postinst: 11: /var/lib/dpkg/info/software-properties-gtk.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/python-software-properties_0.82.7.7_all.deb
 /var/cache/apt/archives/software-center_5.2.10_all.deb
 /var/cache/apt/archives/software-properties-common_0.82.7.7_all.deb
 /var/cache/apt/archives/software-properties-gtk_0.82.7.7_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)`

我真的在这里迷路了,任何帮助都将不胜感激。

提前感谢任何能帮助我的人

答案1

尝试 sudo apt-get -f install。如果它显示相同的错误,则意味着下载的软件包有问题。您必须安装另一个 ppa,用有缺陷的软件包替换稳定的软件包。因此在终端中输入以下内容

sudo apt-get 删除 python-软件属性软件中心软件属性通用软件属性 gtk

然后 sudo apt-get autoclean 然后 sudo apt-get autoremove。尝试确定您是否安装了不受信任的 ppa。如果您觉得自己没有做错任何事,请使用以下命令重新安装它们

sudo apt-get 安装 python-软件属性软件中心软件属性通用软件属性 gtk

看看问题是否仍然存在

答案2

sudo apt-get update然后尝试执行sudo apt-get -f install,如果问题仍然存在,请检查是否添加了任何不受信任的 PPA。

如果有,您可以通过执行sudo apt-get install ppa-purge来删除它们sudo ppa-purge [ppa link here]。删除后,您可以继续再次输入前两个命令。

相关内容