Estou usando o Ubuntu 13.04, que instalei alguns dias atrás. Estou tentando instalar nodejs
e npm
. Tentei instalar primeiro a partir da linha de comando e depois a desinstalei. Então algo quebrou.
sudo apt-get install -f nodejs npm
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:
nodejs : Conflicts: npm
E: Unable to correct problems, you have held broken packages.
A saída de /etc/apt/sources.list
está abaixo:
# deb cdrom:[Ubuntu 13.04 _Raring Ringtail_ - Release amd64 (20130424)]/ raring main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://in.archive.ubuntu.com/ubuntu/ raring main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ raring main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ raring-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ raring-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ raring universe
deb-src http://in.archive.ubuntu.com/ubuntu/ raring universe
deb http://in.archive.ubuntu.com/ubuntu/ raring-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ raring-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ raring multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://in.archive.ubuntu.com/ubuntu/ raring-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ raring-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu raring-security main restricted
deb-src http://security.ubuntu.com/ubuntu raring-security main restricted
deb http://security.ubuntu.com/ubuntu raring-security universe
deb-src http://security.ubuntu.com/ubuntu raring-security universe
deb http://security.ubuntu.com/ubuntu raring-security multiverse
deb-src http://security.ubuntu.com/ubuntu raring-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu raring partner
# deb-src http://archive.canonical.com/ubuntu raring partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu raring main
deb-src http://extras.ubuntu.com/ubuntu raring main
A saída de /etc/apt/sources.list.d/*
está abaixo:
deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu raring main
# deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu raring main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb 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 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 http://dl.google.com/linux/chrome/deb/ stable main
deb http://deb.opera.com/opera/ stable non-free
deb http://deb.opera.com/opera/ stable non-free
deb http://deb.opera.com/opera/ stable non-free
deb http://deb.opera.com/opera/ stable non-free
apt
package-management
John Qualis
fonte
fonte
sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
APT::Default-Release
. Se isso exigir que um pacote seja instalado a partir de uma versão mais antiga que as dependências que já estão presentes, elas poderão ser incompatíveis, causando o mesmo erro.Respostas:
Você deve poder ver a lista de pacotes retidos por:
e depois solte-os
Depois disso, você poderá remover o pacote conflitante (parece ser
npm
) e depois reinstalar tudo.Se isso falhar, você pode tentar o
aptitude
caminho --- geralmente é capaz de separar melhor as árvores de dependência.Nos dois casos, tenha cuidado ao aplicar comandos e verifique cuidadosamente a lista de pacotes marcados para remoção.
fonte
apt-mark showhold
não produz nada. Alguma outra ideia? (Eu também estou em Ask Ubuntu via Chat ) :)aptitude
é capaz de separar árvores de dependências de uma maneira melhor do que simplesapt
.Use o aptitude em vez do apt-get. É mais inteligente. Ele não apenas administra a desclassificação de pacotes conflitantes para você, mas também faz uma série de recomendações perguntando qual dos muitos possíveis cenários de trabalho sugeridos você gostaria.
Se você ainda não possui aptidão em sua máquina, obtenha-a com
fonte
sudo apt-get install aptitude
se seus pacotes estiverem quebrados em primeiro lugar.Para que eu resolvesse esse problema, tive que instalar o synaptic primeiro usando o comando abaixo, e depois tudo funcionou bem.
fonte
Descobri que
dpkg -r
me permite remover pacotes um por um, sem desencadear uma cascata de outro comportamento.Não tenho certeza se essa é uma boa solução, mas fui com ela e tudo parece bem.
fonte
dselect
é uma ferramenta ainda melhor (um pouco de uma curva de aprendizado, mas fornece mais feedback).