Erro durante uma atualização

1
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)

me ajude a dominar

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

Eu tentei usar os comandos acima, mas sem efeito.

    
por Qwerty 22.04.2015 / 12:50

1 resposta

0

Aqui está o problema:

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

Estes pacotes não vêm dos repositórios oficiais do Ubuntu e a atualização destes pacotes tenta sobrescrever arquivos que foram instalados por outro pacote:

libjpeg8_8d-1+deb7u1_amd64.deb
dh-python_1.20140511-1~bpo70+1_all.deb

Você pode encontrar o local de origem com estes comandos:

apt-cache policy libjpeg8
apt-cache polica dh-python

por exemplo. para Shotwell na minha instalação:

$ 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

Com esta linha:

500 http://ppa.launchpad.net/yorba/ppa/ubuntu/ vivid/main

Eu posso identificar o arquivo de lista associado em /etc/apt e / ou /etc/apt/sources.list.d

por exemplo:

$ 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

E eu teria que alterar ou excluir este arquivo:

/etc/apt/sources.list.d/yorba-ubuntu-ppa-vivid.list

Remova os repositórios associados e faça o downgrade dos pacotes:

sudo apt-get update
sudo apt-get install libjpeg8=8c-2ubuntu8
sudo apt-get install dh-python=1.20140128-1ubuntu8

E a atualização funcionará.

    
por A.B. 22.04.2015 / 13:24