无法 apt-get - 软件包安装问题

无法 apt-get - 软件包安装问题

当我更新机器的时候,我的机器崩溃了,我不得不重新启动。

它在崩溃时正在更新新软件包。

当我尝试使用它时,apt-get它总是因为mysql包而失败。

mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.32-0ubuntu0.12.04.1) but 5.5.34-0ubuntu0.12.04.1 is to be installed

键入sudo apt-get -f install会返回以下错误:

dpkg: dependency problems prevent configuration of mysql-server-5.5:
 mysql-server-5.5 depends on mysql-server-core-5.5 (= 5.5.32-0ubuntu0.12.04.1); however:
  Version of mysql-server-core-5.5 on system is 5.5.34-0ubuntu0.12.04.1.
dpkg: error processing mysql-server-5.5 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.     
                                                                                                     dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                                                            Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

有谁知道如何解决这个问题?

谢谢

答案1

我通过直接从下载缓存安装包解决了这个问题:

dpkg -i /var/cache/apt/archives/mysql-server-5.5_5.5.34-0ubuntu0.12.04.1_i386.deb

答案2

尝试使用完全删除包

apt-get remove --purge package

然后重新安装它

apt-get install

你可能需要使用su来做到这一点。

相关内容