apt-get upgrade falha devido a problemas de dependência

1

Estou tentando atualizar e, ao fazer isso, recebo o seguinte:

devteam@hephaestusx:~/Projects$ sudo apt-get 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:
 libboost-python-dev : Depends: libboost-python1.46-dev but it is not installed
E: Unmet dependencies. Try using -f.
devteam@hephaestusx:~/Projects$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
devteam@hephaestusx:~/Projects$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libboost-python1.46-dev libboost1.46-dev
Suggested packages:
  libboost1.46-doc libboost-date-time1.46-dev libboost-filesystem1.46-dev libboost-graph1.46-dev libboost-iostreams1.46-dev
  libboost-math1.46-dev libboost-program-options1.46-dev libboost-random1.46-dev libboost-regex1.46-dev libboost-serialization1.46-dev
  libboost-signals1.46-dev libboost-system1.46-dev libboost-test1.46-dev libboost-thread1.46-dev libboost-wave1.46-dev doxygen default-jdk
  fop
The following NEW packages will be installed:
  libboost-python1.46-dev libboost1.46-dev
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
6 not fully installed or removed.
Need to get 0 B/8,151 kB of archives.
After this operation, 80.1 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 226442 files and directories currently installed.)
Unpacking libboost1.46-dev (from .../libboost1.46-dev_1.46.1-5ubuntu2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libboost1.46-dev_1.46.1-5ubuntu2_amd64.deb (--unpack):
 trying to overwrite '/usr/include/boost/aligned_storage.hpp', which is also in package libboost1.40-dev 1.40.0-6ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking libboost-python1.46-dev (from .../libboost-python1.46-dev_1.46.1-5ubuntu2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libboost-python1.46-dev_1.46.1-5ubuntu2_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/libboost_python-py26.a', which is also in package libboost-python1.40-dev 1.40.0-6ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libboost1.46-dev_1.46.1-5ubuntu2_amd64.deb
 /var/cache/apt/archives/libboost-python1.46-dev_1.46.1-5ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Alguma ideia de como remediar isso?

    
por kenneth koontz 09.02.2012 / 18:00

2 respostas

3

Atualmente, você tem libboost1.40-all-dev do Maverick instalado. Agora você está tentando instalar o libboost1.46-dev do Oneiric. É semelhante para libboost-python1.46-dev .

Isso não funciona, misturar pacotes de diferentes versões do Ubuntu só funciona em poucos casos especiais.

Tente remover os pacotes libboost-python1.46-dev e libboost1.46-dev .

    
por Florian Diesch 09.02.2012 / 18:53
0

Os privilégios de root também são necessários para o apt-get upgrade, então:

  

sudo apt-get update & amp; & amp; sudo apt-get upgrade

    
por Rubyist 24.05.2012 / 08:05