E: Unable to correct problems, you have held broken packages

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
80
down vote

favorite
32












I am using Ubuntu 13.04 which I installed few days back. I am trying to install nodejs and npm. I tried to install from command line first and then uninstalled it. Then something broke.



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.


The output of /etc/apt/sources.list is below:



# 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


The output of /etc/apt/sources.list.d/* is below:



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









share|improve this question



















  • 1




    Not sure whats the question however this can help you Go to synaptic package manager. Edit > Fix broken Packages.
    – danijelc
    Oct 21 '13 at 17:15











  • when I do 'gksudo synaptic' nothing happens
    – John Qualis
    Oct 21 '13 at 17:17






  • 1




    You need to install it first sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
    – danijelc
    Oct 21 '13 at 17:20











  • Another way you can get a similar error (though apparently not for the OP) is to set APT::Default-Release. If that requires a package be installed from an older release than dependencies that are already present, they may be incompatible, which gives you the same error.
    – poolie
    Dec 15 '13 at 19:09










  • Related: Unable to correct problems, you have held broken packages
    – Melebius
    Jul 25 at 11:18














up vote
80
down vote

favorite
32












I am using Ubuntu 13.04 which I installed few days back. I am trying to install nodejs and npm. I tried to install from command line first and then uninstalled it. Then something broke.



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.


The output of /etc/apt/sources.list is below:



# 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


The output of /etc/apt/sources.list.d/* is below:



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









share|improve this question



















  • 1




    Not sure whats the question however this can help you Go to synaptic package manager. Edit > Fix broken Packages.
    – danijelc
    Oct 21 '13 at 17:15











  • when I do 'gksudo synaptic' nothing happens
    – John Qualis
    Oct 21 '13 at 17:17






  • 1




    You need to install it first sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
    – danijelc
    Oct 21 '13 at 17:20











  • Another way you can get a similar error (though apparently not for the OP) is to set APT::Default-Release. If that requires a package be installed from an older release than dependencies that are already present, they may be incompatible, which gives you the same error.
    – poolie
    Dec 15 '13 at 19:09










  • Related: Unable to correct problems, you have held broken packages
    – Melebius
    Jul 25 at 11:18












up vote
80
down vote

favorite
32









up vote
80
down vote

favorite
32






32





I am using Ubuntu 13.04 which I installed few days back. I am trying to install nodejs and npm. I tried to install from command line first and then uninstalled it. Then something broke.



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.


The output of /etc/apt/sources.list is below:



# 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


The output of /etc/apt/sources.list.d/* is below:



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









share|improve this question















I am using Ubuntu 13.04 which I installed few days back. I am trying to install nodejs and npm. I tried to install from command line first and then uninstalled it. Then something broke.



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.


The output of /etc/apt/sources.list is below:



# 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


The output of /etc/apt/sources.list.d/* is below:



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 4 '16 at 3:11









ubashu

2,23721736




2,23721736










asked Oct 21 '13 at 17:07









John Qualis

503154




503154







  • 1




    Not sure whats the question however this can help you Go to synaptic package manager. Edit > Fix broken Packages.
    – danijelc
    Oct 21 '13 at 17:15











  • when I do 'gksudo synaptic' nothing happens
    – John Qualis
    Oct 21 '13 at 17:17






  • 1




    You need to install it first sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
    – danijelc
    Oct 21 '13 at 17:20











  • Another way you can get a similar error (though apparently not for the OP) is to set APT::Default-Release. If that requires a package be installed from an older release than dependencies that are already present, they may be incompatible, which gives you the same error.
    – poolie
    Dec 15 '13 at 19:09










  • Related: Unable to correct problems, you have held broken packages
    – Melebius
    Jul 25 at 11:18












  • 1




    Not sure whats the question however this can help you Go to synaptic package manager. Edit > Fix broken Packages.
    – danijelc
    Oct 21 '13 at 17:15











  • when I do 'gksudo synaptic' nothing happens
    – John Qualis
    Oct 21 '13 at 17:17






  • 1




    You need to install it first sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
    – danijelc
    Oct 21 '13 at 17:20











  • Another way you can get a similar error (though apparently not for the OP) is to set APT::Default-Release. If that requires a package be installed from an older release than dependencies that are already present, they may be incompatible, which gives you the same error.
    – poolie
    Dec 15 '13 at 19:09










  • Related: Unable to correct problems, you have held broken packages
    – Melebius
    Jul 25 at 11:18







1




1




Not sure whats the question however this can help you Go to synaptic package manager. Edit > Fix broken Packages.
– danijelc
Oct 21 '13 at 17:15





Not sure whats the question however this can help you Go to synaptic package manager. Edit > Fix broken Packages.
– danijelc
Oct 21 '13 at 17:15













when I do 'gksudo synaptic' nothing happens
– John Qualis
Oct 21 '13 at 17:17




when I do 'gksudo synaptic' nothing happens
– John Qualis
Oct 21 '13 at 17:17




1




1




You need to install it first sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
– danijelc
Oct 21 '13 at 17:20





You need to install it first sudo apt-get update sudo apt-get upgrade sudo apt-get install synaptic
– danijelc
Oct 21 '13 at 17:20













Another way you can get a similar error (though apparently not for the OP) is to set APT::Default-Release. If that requires a package be installed from an older release than dependencies that are already present, they may be incompatible, which gives you the same error.
– poolie
Dec 15 '13 at 19:09




Another way you can get a similar error (though apparently not for the OP) is to set APT::Default-Release. If that requires a package be installed from an older release than dependencies that are already present, they may be incompatible, which gives you the same error.
– poolie
Dec 15 '13 at 19:09












Related: Unable to correct problems, you have held broken packages
– Melebius
Jul 25 at 11:18




Related: Unable to correct problems, you have held broken packages
– Melebius
Jul 25 at 11:18










4 Answers
4






active

oldest

votes

















up vote
20
down vote



accepted










You should be able to see the list of held packages by:



apt-mark showhold 


and then un-hold them by



sudo apt-mark unhold <package name>


After that, you should be able to remove the conflicting package (it seems to be npm) and then reinstall all.



If this fail, you can try the aptitude way --- often it's able to disentangle dependency trees better.



In both cases, be careful when applying commands, and check carefully the list of packages that are marked for remove.






share|improve this answer


















  • 87




    When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
    – Madara Uchiha
    Dec 21 '13 at 11:18






  • 15




    Yup. Me too. For me this command never outputted anything, ever.
    – yPhil
    Apr 13 '14 at 17:37






  • 2




    To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
    – user146300
    Jul 22 '16 at 9:33






  • 3




    Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
    – Rmano
    Jul 23 '16 at 8:34






  • 1




    apt-mark showhold does nothing for me.
    – kRazzy R
    Nov 10 '17 at 23:26

















up vote
181
down vote













Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like.



sudo aptitude install myNewPackage


If you don't have aptitude on your machine yet, get it with



sudo apt-get install aptitude





share|improve this answer
















  • 25




    The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
    – Johan Karlsson
    Sep 4 '14 at 10:58






  • 4




    Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
    – bmacnaughton
    Apr 29 '15 at 0:54










  • Not to mention, it works on a headless server
    – bsd
    Jan 9 '16 at 12:04










  • yes, but why we need to use this solution? because almost computers are 64 bits now ??
    – vanduc1102
    Feb 3 '16 at 15:46






  • 4




    The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
    – user13161
    Mar 15 '17 at 20:08

















up vote
4
down vote













For me to solve this problem, I just had to install synaptic first using below commmand, and then everything works fine.



sudo apt-get install synaptic





share|improve this answer





























    up vote
    0
    down vote













    I found out that dpkg -r allows me to remove packages one-by-one, without triggering a cascade of other behaviour.



    I am not sure this is a good solution, but I went with it and everything seems fine.






    share|improve this answer




















    • dselect is an even better tool (bit of a learning curve, but gives more feedback).
      – isomorphismes
      Aug 1 '17 at 22:37









    protected by Community♦ Mar 22 '16 at 22:24



    Thank you for your interest in this question.
    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



    Would you like to answer one of these unanswered questions instead?














    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    20
    down vote



    accepted










    You should be able to see the list of held packages by:



    apt-mark showhold 


    and then un-hold them by



    sudo apt-mark unhold <package name>


    After that, you should be able to remove the conflicting package (it seems to be npm) and then reinstall all.



    If this fail, you can try the aptitude way --- often it's able to disentangle dependency trees better.



    In both cases, be careful when applying commands, and check carefully the list of packages that are marked for remove.






    share|improve this answer


















    • 87




      When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
      – Madara Uchiha
      Dec 21 '13 at 11:18






    • 15




      Yup. Me too. For me this command never outputted anything, ever.
      – yPhil
      Apr 13 '14 at 17:37






    • 2




      To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
      – user146300
      Jul 22 '16 at 9:33






    • 3




      Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
      – Rmano
      Jul 23 '16 at 8:34






    • 1




      apt-mark showhold does nothing for me.
      – kRazzy R
      Nov 10 '17 at 23:26














    up vote
    20
    down vote



    accepted










    You should be able to see the list of held packages by:



    apt-mark showhold 


    and then un-hold them by



    sudo apt-mark unhold <package name>


    After that, you should be able to remove the conflicting package (it seems to be npm) and then reinstall all.



    If this fail, you can try the aptitude way --- often it's able to disentangle dependency trees better.



    In both cases, be careful when applying commands, and check carefully the list of packages that are marked for remove.






    share|improve this answer


















    • 87




      When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
      – Madara Uchiha
      Dec 21 '13 at 11:18






    • 15




      Yup. Me too. For me this command never outputted anything, ever.
      – yPhil
      Apr 13 '14 at 17:37






    • 2




      To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
      – user146300
      Jul 22 '16 at 9:33






    • 3




      Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
      – Rmano
      Jul 23 '16 at 8:34






    • 1




      apt-mark showhold does nothing for me.
      – kRazzy R
      Nov 10 '17 at 23:26












    up vote
    20
    down vote



    accepted







    up vote
    20
    down vote



    accepted






    You should be able to see the list of held packages by:



    apt-mark showhold 


    and then un-hold them by



    sudo apt-mark unhold <package name>


    After that, you should be able to remove the conflicting package (it seems to be npm) and then reinstall all.



    If this fail, you can try the aptitude way --- often it's able to disentangle dependency trees better.



    In both cases, be careful when applying commands, and check carefully the list of packages that are marked for remove.






    share|improve this answer














    You should be able to see the list of held packages by:



    apt-mark showhold 


    and then un-hold them by



    sudo apt-mark unhold <package name>


    After that, you should be able to remove the conflicting package (it seems to be npm) and then reinstall all.



    If this fail, you can try the aptitude way --- often it's able to disentangle dependency trees better.



    In both cases, be careful when applying commands, and check carefully the list of packages that are marked for remove.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 13 '17 at 12:24









    Community♦

    1




    1










    answered Oct 21 '13 at 18:15









    Rmano

    24.8k874142




    24.8k874142







    • 87




      When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
      – Madara Uchiha
      Dec 21 '13 at 11:18






    • 15




      Yup. Me too. For me this command never outputted anything, ever.
      – yPhil
      Apr 13 '14 at 17:37






    • 2




      To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
      – user146300
      Jul 22 '16 at 9:33






    • 3




      Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
      – Rmano
      Jul 23 '16 at 8:34






    • 1




      apt-mark showhold does nothing for me.
      – kRazzy R
      Nov 10 '17 at 23:26












    • 87




      When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
      – Madara Uchiha
      Dec 21 '13 at 11:18






    • 15




      Yup. Me too. For me this command never outputted anything, ever.
      – yPhil
      Apr 13 '14 at 17:37






    • 2




      To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
      – user146300
      Jul 22 '16 at 9:33






    • 3




      Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
      – Rmano
      Jul 23 '16 at 8:34






    • 1




      apt-mark showhold does nothing for me.
      – kRazzy R
      Nov 10 '17 at 23:26







    87




    87




    When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
    – Madara Uchiha
    Dec 21 '13 at 11:18




    When I tried that with wine1.6, apt-mark showhold outputs nothing. Any other ideas? (I am also in Ask Ubuntu Chat) :)
    – Madara Uchiha
    Dec 21 '13 at 11:18




    15




    15




    Yup. Me too. For me this command never outputted anything, ever.
    – yPhil
    Apr 13 '14 at 17:37




    Yup. Me too. For me this command never outputted anything, ever.
    – yPhil
    Apr 13 '14 at 17:37




    2




    2




    To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
    – user146300
    Jul 22 '16 at 9:33




    To the readers: make sure to check out @DragonLord 's tip to use aptitude! Works great.
    – user146300
    Jul 22 '16 at 9:33




    3




    3




    Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
    – Rmano
    Jul 23 '16 at 8:34




    Yep, I concur --- oftentimes aptitude is able to disentangle dependencies trees in a better way than plain apt.
    – Rmano
    Jul 23 '16 at 8:34




    1




    1




    apt-mark showhold does nothing for me.
    – kRazzy R
    Nov 10 '17 at 23:26




    apt-mark showhold does nothing for me.
    – kRazzy R
    Nov 10 '17 at 23:26












    up vote
    181
    down vote













    Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like.



    sudo aptitude install myNewPackage


    If you don't have aptitude on your machine yet, get it with



    sudo apt-get install aptitude





    share|improve this answer
















    • 25




      The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
      – Johan Karlsson
      Sep 4 '14 at 10:58






    • 4




      Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
      – bmacnaughton
      Apr 29 '15 at 0:54










    • Not to mention, it works on a headless server
      – bsd
      Jan 9 '16 at 12:04










    • yes, but why we need to use this solution? because almost computers are 64 bits now ??
      – vanduc1102
      Feb 3 '16 at 15:46






    • 4




      The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
      – user13161
      Mar 15 '17 at 20:08














    up vote
    181
    down vote













    Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like.



    sudo aptitude install myNewPackage


    If you don't have aptitude on your machine yet, get it with



    sudo apt-get install aptitude





    share|improve this answer
















    • 25




      The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
      – Johan Karlsson
      Sep 4 '14 at 10:58






    • 4




      Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
      – bmacnaughton
      Apr 29 '15 at 0:54










    • Not to mention, it works on a headless server
      – bsd
      Jan 9 '16 at 12:04










    • yes, but why we need to use this solution? because almost computers are 64 bits now ??
      – vanduc1102
      Feb 3 '16 at 15:46






    • 4




      The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
      – user13161
      Mar 15 '17 at 20:08












    up vote
    181
    down vote










    up vote
    181
    down vote









    Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like.



    sudo aptitude install myNewPackage


    If you don't have aptitude on your machine yet, get it with



    sudo apt-get install aptitude





    share|improve this answer












    Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflicting packages for you, but will make a series of recommendations asking you which of many possible suggested working scenarios you would like.



    sudo aptitude install myNewPackage


    If you don't have aptitude on your machine yet, get it with



    sudo apt-get install aptitude






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 20 '14 at 3:40









    DragonLord

    2,000276




    2,000276







    • 25




      The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
      – Johan Karlsson
      Sep 4 '14 at 10:58






    • 4




      Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
      – bmacnaughton
      Apr 29 '15 at 0:54










    • Not to mention, it works on a headless server
      – bsd
      Jan 9 '16 at 12:04










    • yes, but why we need to use this solution? because almost computers are 64 bits now ??
      – vanduc1102
      Feb 3 '16 at 15:46






    • 4




      The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
      – user13161
      Mar 15 '17 at 20:08












    • 25




      The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
      – Johan Karlsson
      Sep 4 '14 at 10:58






    • 4




      Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
      – bmacnaughton
      Apr 29 '15 at 0:54










    • Not to mention, it works on a headless server
      – bsd
      Jan 9 '16 at 12:04










    • yes, but why we need to use this solution? because almost computers are 64 bits now ??
      – vanduc1102
      Feb 3 '16 at 15:46






    • 4




      The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
      – user13161
      Mar 15 '17 at 20:08







    25




    25




    The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
    – Johan Karlsson
    Sep 4 '14 at 10:58




    The best answer. I have tried apt-get for the last couple of days. With aptitude this was solved in seconds :-)
    – Johan Karlsson
    Sep 4 '14 at 10:58




    4




    4




    Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
    – bmacnaughton
    Apr 29 '15 at 0:54




    Thank you. I have spent so much time reading different ways to fix the problem that apt-get won't explain that I was astounded when aptitude just laid out the specific problem and even provided a solution.
    – bmacnaughton
    Apr 29 '15 at 0:54












    Not to mention, it works on a headless server
    – bsd
    Jan 9 '16 at 12:04




    Not to mention, it works on a headless server
    – bsd
    Jan 9 '16 at 12:04












    yes, but why we need to use this solution? because almost computers are 64 bits now ??
    – vanduc1102
    Feb 3 '16 at 15:46




    yes, but why we need to use this solution? because almost computers are 64 bits now ??
    – vanduc1102
    Feb 3 '16 at 15:46




    4




    4




    The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
    – user13161
    Mar 15 '17 at 20:08




    The one downside to this solution: you can't do sudo apt-get install aptitude if your packages are broken in the first place.
    – user13161
    Mar 15 '17 at 20:08










    up vote
    4
    down vote













    For me to solve this problem, I just had to install synaptic first using below commmand, and then everything works fine.



    sudo apt-get install synaptic





    share|improve this answer


























      up vote
      4
      down vote













      For me to solve this problem, I just had to install synaptic first using below commmand, and then everything works fine.



      sudo apt-get install synaptic





      share|improve this answer
























        up vote
        4
        down vote










        up vote
        4
        down vote









        For me to solve this problem, I just had to install synaptic first using below commmand, and then everything works fine.



        sudo apt-get install synaptic





        share|improve this answer














        For me to solve this problem, I just had to install synaptic first using below commmand, and then everything works fine.



        sudo apt-get install synaptic






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 17 '13 at 0:00









        Richard

        5,96883364




        5,96883364










        answered Dec 16 '13 at 23:19









        Alaa ElSaman

        412




        412




















            up vote
            0
            down vote













            I found out that dpkg -r allows me to remove packages one-by-one, without triggering a cascade of other behaviour.



            I am not sure this is a good solution, but I went with it and everything seems fine.






            share|improve this answer




















            • dselect is an even better tool (bit of a learning curve, but gives more feedback).
              – isomorphismes
              Aug 1 '17 at 22:37














            up vote
            0
            down vote













            I found out that dpkg -r allows me to remove packages one-by-one, without triggering a cascade of other behaviour.



            I am not sure this is a good solution, but I went with it and everything seems fine.






            share|improve this answer




















            • dselect is an even better tool (bit of a learning curve, but gives more feedback).
              – isomorphismes
              Aug 1 '17 at 22:37












            up vote
            0
            down vote










            up vote
            0
            down vote









            I found out that dpkg -r allows me to remove packages one-by-one, without triggering a cascade of other behaviour.



            I am not sure this is a good solution, but I went with it and everything seems fine.






            share|improve this answer












            I found out that dpkg -r allows me to remove packages one-by-one, without triggering a cascade of other behaviour.



            I am not sure this is a good solution, but I went with it and everything seems fine.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 28 '17 at 16:29









            isomorphismes

            82721128




            82721128











            • dselect is an even better tool (bit of a learning curve, but gives more feedback).
              – isomorphismes
              Aug 1 '17 at 22:37
















            • dselect is an even better tool (bit of a learning curve, but gives more feedback).
              – isomorphismes
              Aug 1 '17 at 22:37















            dselect is an even better tool (bit of a learning curve, but gives more feedback).
            – isomorphismes
            Aug 1 '17 at 22:37




            dselect is an even better tool (bit of a learning curve, but gives more feedback).
            – isomorphismes
            Aug 1 '17 at 22:37





            protected by Community♦ Mar 22 '16 at 22:24



            Thank you for your interest in this question.
            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



            Would you like to answer one of these unanswered questions instead?


            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491