如何修复“无法配置*:i386,因为*:amd64 版本不同”?

如何修复“无法配置*:i386,因为*:amd64 版本不同”?

我设法破解了 apt-get,我认为这与 supercollider 和 Skype 之间的 libqt 竞争版本有关。运行时apt-get -f install我得到:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libxml++2.6-2 libffado2 libconfig++8 libssl1.0.0:i386
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libqt4-declarative:i386 libqt4-sql-mysql libqt4-sql-mysql:i386 libqt4-test qdbus
Suggested packages:
  libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386 libqt4-declarative-particles:i386 libqt4-declarative-shaders:i386 qt4-qmlviewer:i386
  libqt4-dev libqt4-dev:i386
The following packages will be upgraded:
  libqt4-declarative:i386 libqt4-sql-mysql libqt4-sql-mysql:i386 libqt4-test qdbus
5 upgraded, 0 newly installed, 0 to remove and 449 not upgraded.
14 not fully installed or removed.
Need to get 0 B/1,236 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 ... 183437 files and directories currently installed.)
Preparing to replace libqt4-sql-mysql 4:4.8.1-0ubuntu4.1 (using .../libqt4-sql-mysql_4%3a4.8.1-0ubuntu4.2_amd64.deb) ...
Unpacking replacement libqt4-sql-mysql ...
dpkg: error processing libqt4-sql-mysql:i386 (--configure):
 libqt4-sql-mysql:i386 4:4.8.1-0ubuntu4.1 cannot be configured because libqt4-sql-mysql:amd64 is in a different version (4:4.8.1-0ubuntu4.2)
dpkg: error processing libqt4-sql-mysql (--configure):
 libqt4-sql-mysql:amd64 4:4.8.1-0ubuntu4.2 cannot be configured because libqt4-sql-mysql:i386 is in a different version (4:4.8.1-0ubuntu4.1)
Errors were encountered while processing:
 libqt4-sql-mysql:i386
 libqt4-sql-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

我读到我可以通过安装 aptitude 并删除并重新安装损坏的软件包来解决这个问题,但我无法使用 dpkg 安装它。

答案1

您应该能够dpkg直接使用以下命令删除软件包,例如:

sudo dpkg -r libqt4-sql-mysql:i386

然后你可以看看是否可以配置剩余的包

sudo dpkg --configure -a

一旦一切配置成功,apt-get就应该能够安装aptitude,并能够找出解决方案来修复依赖关系。

答案2

使用终端尝试这些

sudo apt-get autoremove

sudo apt-get clean

sudo apt-get install -f

相关内容