Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
libjpeg-turbo8
Use 'apt-get autoremove' to remove it.
The following packages have been kept back:
console-setup gstreamer0.10-plugins-ugly hunspell-en-us initramfs-tools
initscripts keyboard-configuration libalgorithm-diff-xs-perl
libfreerdp-plugins-standard libgbm1 libgl1-mesa-dev libgnomevfs2-0
libgnomevfs2-common libio-pty-perl liblist-moreutils-perl
liblocale-gettext-perl libnet-libidn-perl libnetpbm10 libnih-dbus1 libnih1
libperlio-gzip-perl libsub-identify-perl libsub-name-perl
libtext-charwidth-perl libva1 mesa-common-dev netpbm python-cairo
python-openssl python-pyorbit ttf-punjabi-fonts xdg-utils xorg
The following packages will be upgraded:
dh-python libjpeg8
2 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
Need to get 0 B/204 kB of archives.
After this operation, 272 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 246731 files and directories currently installed.)
Preparing to unpack .../libjpeg8_8d-1+deb7u1_amd64.deb ...
Unpacking libjpeg8:amd64 (8d-1+deb7u1) over (8c-2ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libjpeg.so.8', which is also in package libjpeg-turbo8:amd64 1.3.0-0ubuntu2
Preparing to unpack .../dh-python_1.20140511-1~bpo70+1_all.deb ...
Unpacking dh-python (1.20140511-1~bpo70+1) over (1.20140128-1ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/dh-python_1.20140511-1~bpo70+1_all.deb (--unpack):
trying to overwrite '/usr/share/man/man1/dh_python2.1.gz', which is also in package python 2.7.5-5ubuntu3
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
/var/cache/apt/archives/libjpeg8_8d-1+deb7u1_amd64.deb
/var/cache/apt/archives/dh-python_1.20140511-1~bpo70+1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
帮助我,主人
sudo apt-get remove libjpeg-turbo8
sudo apt-get -f remove
sudo dpkg -r libjpeg-turbo8
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoclean
我尝试使用上述命令,但没有效果。
答案1
问题如下:
Unpacking libjpeg8:amd64 (8d-1+deb7u1) over (8c-2ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/libjpeg8_8d-1+deb7u1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/x86_64-linux-gnu/libjpeg.so.8', which is also in package libjpeg-turbo8:amd64 1.3.0-0ubuntu2
Preparing to unpack .../dh-python_1.20140511-1~bpo70+1_all.deb ...
Unpacking dh-python (1.20140511-1~bpo70+1) over (1.20140128-1ubuntu8) ...
dpkg: error processing archive /var/cache/apt/archives/dh-python_1.20140511-1~bpo70+1_all.deb (--unpack):
trying to overwrite '/usr/share/man/man1/dh_python2.1.gz', which is also in package python 2.7.5-5ubuntu3
这些软件包不是来自官方的 Ubuntu 存储库,并且这些软件包的升级会尝试覆盖是由另一个包安装:
libjpeg8_8d-1+deb7u1_amd64.deb
dh-python_1.20140511-1~bpo70+1_all.deb
您可以使用以下命令找到源位置:
apt-cache policy libjpeg8
apt-cache polica dh-python
例如肖特韦尔在我的安装中:
$ apt-cache policy shotwell
shotwell:
Installed: (none)
Candidate: 0.18.0-0ubuntu4.3
Version table:
0.18.0-0ubuntu4.3 0
500 http://mirror.amsiohosting.net/archive.ubuntu.com/ trusty-updates/main amd64 Packages
0.18.0-0ubuntu4.1 0
100 /var/lib/dpkg/status
0.18.0-0ubuntu4 0
500 http://mirror.amsiohosting.net/archive.ubuntu.com/ trusty/main amd64 Packages
使用以下行:
500 http://ppa.launchpad.net/yorba/ppa/ubuntu/ vivid/main
我可以识别相关列表文件/etc/apt
和/或/etc/apt/sources.list.d
例如:
$ find /etc/apt -type f | xargs grep http://ppa.launchpad.net/yorba/
/etc/apt/sources.list.d/yorba-ubuntu-ppa-vivid.list:deb http://ppa.launchpad.net/yorba/ppa/ubuntu vivid main
/etc/apt/sources.list.d/yorba-ubuntu-ppa-vivid.list:# deb-src http://ppa.launchpad.net/yorba/ppa/ubuntu vivid main
/etc/apt/sources.list.d/yorba-ubuntu-ppa-vivid.list.save:deb http://ppa.launchpad.net/yorba/ppa/ubuntu vivid main
/etc/apt/sources.list.d/yorba-ubuntu-ppa-vivid.list.save:# deb-src http://ppa.launchpad.net/yorba/ppa/ubuntu vivid main
我必须更改或删除这个文件:
/etc/apt/sources.list.d/yorba-ubuntu-ppa-vivid.list
删除相关的存储库并降级软件包:
sudo apt-get update
sudo apt-get install libjpeg8=8c-2ubuntu8
sudo apt-get install dh-python=1.20140128-1ubuntu8
升级将会成功。