首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >初等OS Loki中的未满足依赖关系问题

初等OS Loki中的未满足依赖关系问题
EN

Unix & Linux用户
提问于 2017-11-21 11:45:39
回答 1查看 1.4K关注 0票数 1

我有初级操作系统Loki,它在安装金山的WPS办公室之前工作得很好,当我安装它的时候,它工作得很好,但是当我进入终端运行命令# sudo apt-get install anyprogram时,我得到了下面的错误

代码语言:javascript
复制
The following packages have unmet dependencies:
 libpng12-0 : Breaks: libpng12-0:i386 (!= 1.2.50-2+deb8u3) but 1.2.54-1ubuntu1 is to be installed
 libpng12-0:i386 : Breaks: libpng12-0 (!= 1.2.54-1ubuntu1) but 1.2.50-2+deb8u3 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

之后,我搜索了这个问题,并找到了解决方案,比如运行

代码语言:javascript
复制
apt-get -f install
apt-get install -f

但两者都给出了这个错误

代码语言:javascript
复制
~# apt-get install -f
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:
  gnome-system-monitor libatkmm-1.6-1v5 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libbsd0:i386 libcairomm-1.0-1v5 libcups2:i386 libdbus-1-3:i386
  libdecoration0 libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386
  libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386 libffi6:i386
  libfontconfig1:i386 libfreetype6:i386 libgcrypt20:i386 libgl1-mesa-dri:i386
  libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libglibmm-2.4-1v5
  libglu1-mesa:i386 libgmp10:i386 libgnutls30:i386 libgssapi-krb5-2:i386 libgtkmm-3.0-1v5
  libhogweed4:i386 libice6:i386 libidn11:i386 libk5crypto3:i386 libkeyutils1:i386
  libkrb5-3:i386 libkrb5support0:i386 libllvm4.0:i386 libmetacity-private3a libnettle6:i386
  libp11-kit0:i386 libpangomm-1.4-1v5 libpciaccess0:i386 libpng12-0:i386 libprotobuf9v5
  libsensors4:i386 libsigc++-2.0-0v5 libsm6:i386 libstdc++6:i386 libsystemd0:i386
  libtasn1-6:i386 libtxc-dxtn-s2tc0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386
  libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386
  libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
  libxrender1:i386 libxshmfence1:i386 libxxf86vm1:i386 metacity-common session-migration
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libpng12-0
The following packages will be upgraded:
  libpng12-0
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/116 kB of archives.
After this operation, 11.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 228119 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) over (1.2.50-2+deb8u3) ...
dpkg: error processing archive /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libpng12-0/ANNOUNCE', which is different from other instances of package libpng12-0:amd64
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我还搜索了这个问题并找到了这样的解决方案

代码语言:javascript
复制
   sudo apt-get install --fix-broken && sudo apt-get autoremove && sudo apt-get update 

但没有用我也试过了

代码语言:javascript
复制
sudo dpkg --configure -a

但是它也没有解决它带来的错误问题。

代码语言:javascript
复制
:~# sudo dpkg --configure -a
dpkg: error processing package libpng12-0:amd64 (--configure):
 package libpng12-0:amd64 1.2.50-2+deb8u3 cannot be configured because libpng12-0:i386 is at a different version (1.2.54-1ubuntu1)
dpkg: error processing package libpng12-0:i386 (--configure):
 package libpng12-0:i386 1.2.54-1ubuntu1 cannot be configured because libpng12-0:amd64 is at a different version (1.2.50-2+deb8u3)
Errors were encountered while processing:
 libpng12-0:amd64
 libpng12-0:i386

当我搜索这个问题时,它给出了我已经尝试过的解决方案,所以我只能使用visa相反的解决方案,请解决这个问题。

我试过这个解决方案

代码语言:javascript
复制
sudo apt-get clean

但它不起作用

一些额外的信息:

命令:

代码语言:javascript
复制
cat /etc/apt/sources.list

产出:

deb http://archive.ubuntu.com/ubuntu xenial restricted main universe multiverse

命令:

代码语言:javascript
复制
cat /etc/apt/sources.list.d/*

产出:

代码语言:javascript
复制
deb http://packages.elementary.io/appcenter xenial main
deb http://packages.elementary.io/appcenter xenial main
##deb http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
deb http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/stable/ubuntu xenial main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse
deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse
##deb http://ppa.launchpad.net/mpstark/elementary-tweaks-daily/ubuntu xenial main
# deb-src http://ppa.launchpad.net/mpstark/elementary-tweaks-daily/ubuntu xenial main
deb http://ppa.launchpad.net/mpstark/elementary-tweaks-daily/ubuntu xenial main
# deb-src http://ppa.launchpad.net/mpstark/elementary-tweaks-daily/ubuntu xenial main
##deb http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial main
deb http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial main
deb-src http://ppa.launchpad.net/elementary-os/os-patches/ubuntu xenial main
##deb http://ppa.launchpad.net/philip.scott/elementary-tweaks/ubuntu xenial main
# deb-src http://ppa.launchpad.net/philip.scott/elementary-tweaks/ubuntu xenial main
deb http://ppa.launchpad.net/philip.scott/elementary-tweaks/ubuntu xenial main
# deb-src http://ppa.launchpad.net/philip.scott/elementary-tweaks/ubuntu xenial main
deb [arch=amd64] https://repo.skype.com/deb stable main
deb [arch=amd64] https://repo.skype.com/deb stable main
deb https://download.sublimetext.com/ apt/stable/
deb https://download.sublimetext.com/ apt/stable/
##deb http://ppa.launchpad.net/versable/elementary-update/ubuntu xenial main
# deb-src http://ppa.launchpad.net/versable/elementary-update/ubuntu xenial main
deb http://ppa.launchpad.net/versable/elementary-update/ubuntu xenial main
# deb-src http://ppa.launchpad.net/versable/elementary-update/ubuntu xenial main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main
##deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
# deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main
##deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main
# deb-src http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main
deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main
# deb-src http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial main

命令:

代码语言:javascript
复制
apt-cache policy libpng12-0

产出:

代码语言:javascript
复制
libpng12-0:
  Installed: 1.2.50-2+deb8u3
  Candidate: 1.2.54-1ubuntu1
  Version table:
     1.2.54-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
 *** 1.2.50-2+deb8u3 100
        100 /var/lib/dpkg/status
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-11-21 19:28:47

libpng12-0 (1.2.50-2+deb8u3)属于debian,它阻止了常规软件包verion 1.2.54-1ubuntu1的安装。您可以使用dpkg强制安装:

代码语言:javascript
复制
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libpng12-0_1.2.54-1ubuntu1_amd64.deb
sudo apt-get -f install
票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/405981

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档