15.04 无法从软件中心终端安装任何东西

15.04 无法从软件中心终端安装任何东西

前段时间我安装了一些软件(我认为是一些 SDK 软件),但它无法正常工作,所以我删除了它。从那时起,我就一直遇到 Ubuntu 问题。那是在 14.10 中,我希望更新到 15.04 可以修复它,但它没有帮助。每当我启动 Ubuntu 并登录时,它都会告诉我检测到问题并要求我发送报告。我最终停止发送报告,因为它一遍又一遍地重复同样的事情。现在我甚至无法从终端存储库或软件中心安装软件。这是我在软件中心尝试修复它时收到的错误:

installArchives() failed: (Reading database ...   
(Reading database ... 5%  
(Reading database ... 10%  
(Reading database ... 15%  
(Reading database ... 20%  
(Reading database ... 25%  
(Reading database ... 30%  
(Reading database ... 35%  
(Reading database ... 40%  
(Reading database ... 45%  
(Reading database ... 50%  
(Reading database ... 55%  
(Reading database ... 60%  
(Reading database ... 65%  
(Reading database ... 70%  
(Reading database ... 75%  
(Reading database ... 80%  
(Reading database ... 85%  
(Reading database ... 90%  
(Reading database ... 95%  
(Reading database ... 100%  
(Reading database ... 562833 files and directories currently installed.)  
Removing click (0.4.33) ...  
Traceback (most recent call last):  
  File "/usr/bin/click", line 31, in <module>  
    from click import commands  
ImportError: cannot import name 'commands'  
dpkg: error processing package click (--remove):  
 subprocess installed pre-removal script returned error exit status 1  
Errors were encountered while processing:  
 click  
Error in function:   
Setting up pay-service (2.0.0+14.10.20140916-0ubuntu1) ...  
Traceback (most recent call last):  
  File "/usr/bin/click", line 31, in <module>  
    from click import commands  
ImportError: cannot import name 'commands'  
dpkg: error processing package pay-service (--configure):  
 subprocess installed post-installation script returned error exit status 1  
Setting up click-apparmor (0.3.8) ...  
Traceback (most recent call last):  
  File "/usr/bin/click", line 31, in <module>  
    from click import commands  
ImportError: cannot import name 'commands'  
dpkg: error processing package click-apparmor (--configure):  
 subprocess installed post-installation script returned error exit status 1  
dpkg: dependency problems prevent configuration of ubuntu-app-launch:  
 ubuntu-app-launch depends on click-apparmor; however:  
  Package click-apparmor is not configured yet.  

dpkg: error processing package ubuntu-app-launch (--configure):  
 dependency problems - leaving unconfigured  
dpkg: dependency problems prevent configuration of ubuntu-app-launch-tools:  
 ubuntu-app-launch-tools depends on ubuntu-app-launch (= 0.4+15.04.20150410-0ubuntu1); however:  
  Package ubuntu-app-launch is not configured yet.  

dpkg: error processing package ubuntu-app-launch-tools (--configure):  
 dependency problems - leaving unconfigured  
dpkg: dependency problems prevent configuration of unity8-private:amd64:  
 unity8-private:amd64 depends on pay-service; however:  
  Package pay-service is not configured yet.  

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

这是我使用 apt-get install 后得到的结果:

Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
You might want to run 'apt-get -f install' to correct these:  
The following packages have unmet dependencies:  
 click : Depends: python3-click (= 0.4.33) but 0.4.38.5 is to be installed
 openvpn : Depends: libpkcs11-helper1 (>= 1.11) but it is not installable  
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).  

我厌倦了所有的错误,我曾经考虑过重新安装 Ubuntu,但我不想从头开始让它恢复到我想要的样子。

编辑:显然,问题不用我做任何事情就自行解决了。感谢大家如此迅速地回复我并给我如此好的建议!

答案1

/usr/bin/click是一个问题。

进行备份

sudo mv /usr/bin/click /usr/bin/click.bak

或删除它

sudo rm /usr/bin/click

并更新存储库

sudo apt-get update

那么我建议click删除

sudo apt-get remove click

现在,升级您的系统并安装软件。

为了更好地解决依赖关系,我建议aptitude

sudo apt-get install aptitude

并像使用它一样apt-get

sudo aptitude update
sudo aptitude upgrade
sudo aptitude dist-upgrade
sudo aptitude install <package_name>

答案2

您至少有 2 个问题:

1)您有包裹点击已安装,但其删除取决于缺少的文件。尝试强制删除它:sudo apt-get -f remove click

2)你的包裹有问题开放VPN依赖于错误的软件包。尝试删除它: sudo apt-get -f remove openvpn

然后运行sudo apt-get check,如果还有其他错误,请告知我们。

相关内容