我刚刚安装了 ubuntu 12.04,想查找更新。出现错误并询问我是否要修复依赖项。所以我按照它要求的做了,但它一次又一次地失败了。当我想从存储库安装软件“sudo apt-get install ...”时也会发生同样的事情。我读到可以通过“sudo apt-get install -f”安装缺失的依赖项来解决这个问题。但它再次失败并出现错误:
Errors were encountered while processing:
/var/cache/apt/archives/libqtcore4_4%3a4.8.1-0ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
有什么建议吗?
sudo dpkg --configure -a
给我:
Errors were encountered while processing:
libqtgui4:i386
libqt4-sql:i386
ia32-libs-multiarch:i386
libqt4-declarative:i386
libqt4-svg:i386
libqt4-network:i386
libqt4-sql-mysql:i386
libqt4-script:i386
libqt4-dbus:i386
ia32-libs
libqt4-opengl:i386
libqtwebkit4:i386
libqt4-designer:i386
libqt4-scripttools:i386
libqt4-qt3support:i386
libqt4-xml:i386
libqt4-test:i386
libqt4-xmlpatterns:i386
我已经搞定了:
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get install -f
仍然收到此错误:
Errors were encountered while processing:
/var/cache/apt/archives/libqtcore4_4%3a4.8.1-0ubuntu4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
清理缓存并重新下载包sudo apt-get clean
sudo apt-get autoclean
,然后尝试sudo apt-get install -f
,我也遇到了这些错误。
答案2
同样如此,但输出如下:
The following packages have unmet dependencies:
mysql-community-server : Depends: mysql-common (= 5.7.10-1ubuntu14.04) but 5.7.11-1ubuntu14.04 is to be installed
Depends: mysql-client (= 5.7.10-1ubuntu14.04)
mysql-server : Depends: mysql-community-server (= 5.7.11-1ubuntu14.04) but 5.7.10-1ubuntu14.04 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
对我来说,解决方案是:
sudo apt-get install -f mysql-community-server