我在 时遇到libgphoto2-port12_2.5.14
错误apt upgrade
,但使用 无法解决apt -f install
。我没有安装任何新东西,只是执行了常规更新、升级。我在 上看到了其他类似的问题未满足的依赖项——libgphoto2-port12但目前该事宜仍处于搁置状态,我无法发表评论。
尝试了他们所有的“解决方案”,但都没有成功,包括sudo apt-get dist-upgrade -f
他们给出的解决方案。我的信念是:
$ uname -r
4.4.0-81-generic
$ lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
有问题的错误是:
$ sudo apt upgrade
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:
libgphoto2-6:i386 : Depends: libgphoto2-port12:i386 (>= 2.5.10) but 2.5.9-3 is installed
libgphoto2-port12 : Breaks: libgphoto2-port12:i386 (!= 2.5.14+201706200750~ubuntu16.04.1) but 2.5.9-3 is installed
libgphoto2-port12:i386 : Breaks: libgphoto2-port12 (!= 2.5.9-3) but 2.5.14+201706200750~ubuntu16.04.1 is installed
E: Unmet dependencies. Try using -f.
如果我尝试强迫:
$ sudo apt -f install
....
(Reading database ... 438863 files and directories currently installed.)
Preparing to unpack .../libgphoto2-port12_2.5.14+201706200750~ubuntu16.04.1_i386.deb ...
Unpacking libgphoto2-port12:i386 (2.5.14+201706200750~ubuntu16.04.1) over (2.5.9-3) ...
dpkg: error processing archive /var/cache/apt/archives/libgphoto2-port12_2.5.14+201706200750~ubuntu16.04.1_i386.deb (--unpack):
trying to overwrite shared '/usr/share/locale/fr/LC_MESSAGES/libgphoto2_port-12.mo', which is different from other instances of package libgphoto2-port12:i386
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
/var/cache/apt/archives/libgphoto2-port12_2.5.14+201706200750~ubuntu16.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我需要帮助,因为我无法安装任何软件包。如果有人认为这与 ubuntu 无关,请告诉我哪个论坛是合适的。谢谢
答案1
libgphoto2-port122.5.14+201706200750~ubuntu16.04.1:{i386:amd64} 版本来自 ppa:mutlaqja/ppa,而不是来自 ubuntu 存储库。我最终自己解决了这个问题,直接从http://pkgs.org/download/libgphoto2-port12和:
$ wget http://archive.ubuntu.com/ubuntu/pool/main/libg/libgphoto2/libgphoto2-port12_2.5.10-3_amd64.deb
$ wget http://archive.ubuntu.com/ubuntu/pool/main/libg/libgphoto2/libgphoto2-port12_2.5.10-3_i386.deb
然后,使用以下命令安装它们:
$ sudo dpkg -i libgphoto2-port12_2.5.10-3_i386.deb
$ sudo dpkg -i libgphoto2-port12_2.5.10-3_amd64.deb
最后,我使用以下命令删除了有问题的 ppa(暂时删除,直到错误得到解决):
$ sudo add-apt-repository --remove ppa:mutlaqja/ppa
之后,我重新启动以清理缓存并执行标准 apt-get update 和 upgrade,没有错误。现在我又可以自由安装新软件包了。
答案2
“libgphoto2-port12:损坏:libgphoto2-port12:i386(!= 2.5.14+201706200750~ubuntu16.04.1)”
64 位和 32 位版本必须相同。
将 libphoto2-port12 升级到 ver 2.5.14 或者将 libphoto2-port12;I386 降级到 ver 2.5.9-3