apt e consertando dependências do incorect

3

Eu geralmente compilo o que eu preciso, mas estou tentando padronizar minha plataforma de desenvolvimento. Estou executando um schroot de desenvolvimento no Ubuntu (base 11.10: development 12. whatever).

Instalei o boost 1.48 e agora estou tentando instalar o mongodb-dev. Parece depender indiretamente do libboost1.46-dev via libboost-dev. Qual é a solução mais limpa e mais duradoura para eu resolver esse problema?

Estado do meu sistema:

(precise_amd64)hassan@hassan-ubuntu:~/dev/twit/scripts/bin$ sudo apt-get install mongodb-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mongodb-dev : Depends: libboost-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
------------------------------------------------------------------------------------------------
(precise_amd64)hassan@hassan-ubuntu:~/dev/twit/scripts/bin$ sudo apt-get install libboost-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libboost-dev : Depends: libboost1.46-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
-------------------------------------------------------------------------------------------------
(precise_amd64)hassan@hassan-ubuntu:~/dev/twit/scripts/bin$ sudo apt-get install libboost1.48-dev
Reading package lists... Done
Building dependency tree      
Reading state information... Done
libboost1.48-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
------------------------------------------------------------------------------------------------
    
por Hassan Syed 10.02.2012 / 17:05

1 resposta

3

Como você notou, o pacote (vazio) libboost-dev depende do libbost1.46-dev ao invés do libbost1.48-dev (por causa de alguns problemas com pacotes existentes ).

Para resolver isso, reconstrua-o com

apt-get source  libboost-dev # get the source files
cd boost-defaults*
sed -i -e "s/1.46/1.48/g" debian/control # replace 1.46 with 1.48
debuild -uc -us # rebuild the package
dpkg -i ../libboost*.deb # install it.

Para isso, você precisa ter o pacote devscripts instalado.

A maneira mais correta seria adicionar uma nova entrada do changelog a debian/changelog para impedir a atualização do pacote.

Como alternativa, você pode criar um pacote simulado com equivs .

    
por 10.02.2012 / 19:01