npm on WSL: Unable to correct problems, you have held broken packages [duplicate]











up vote
0
down vote

favorite













This question already has an answer here:




  • How to install the latest versions of NodeJS and NPM?

    19 answers



  • How do I enable the “Universe” repository?

    4 answers




I'm using Ubuntu on Windows 10, and was working with Node.js earlier today. It was my first time using node, so I had just installed it (it's installed on the subsystem). All npm commands worked fine too.
Then I accidentally closed the terminal, reopened it and some commands weren't working. I reinstalled node, but I couldn't get npm to work. When I do



sudo apt-get install nmp  


I get



The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed"


with a list of like 20 other dependencies, and the last line is



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


I tried every single solution I found on Stack Overflow. I tried removing and installing different versions of nodejs, I tried installing with --fix-broken, autocleaning, removing, updating, upgrading, -f install. I tried removing and installing the packages from the list one by one. I still get the same thing. If I just try npm install, the modules folder gets created in my project folder, but it's empty, whereas earlier today it could successfully install all modules from the package json.



In the end I literally uninstalled Ubuntu (with the home folder), restarted my PC, installed Ubuntu again, restarted again, installed node.js in the subsystem, and I am still getting the same error with npm.










share|improve this question















marked as duplicate by N0rbert, Fabby, karel, Eric Carvalho, muru Dec 7 at 4:27


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















    up vote
    0
    down vote

    favorite













    This question already has an answer here:




    • How to install the latest versions of NodeJS and NPM?

      19 answers



    • How do I enable the “Universe” repository?

      4 answers




    I'm using Ubuntu on Windows 10, and was working with Node.js earlier today. It was my first time using node, so I had just installed it (it's installed on the subsystem). All npm commands worked fine too.
    Then I accidentally closed the terminal, reopened it and some commands weren't working. I reinstalled node, but I couldn't get npm to work. When I do



    sudo apt-get install nmp  


    I get



    The following packages have unmet dependencies:
    npm : Depends: nodejs but it is not going to be installed"


    with a list of like 20 other dependencies, and the last line is



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


    I tried every single solution I found on Stack Overflow. I tried removing and installing different versions of nodejs, I tried installing with --fix-broken, autocleaning, removing, updating, upgrading, -f install. I tried removing and installing the packages from the list one by one. I still get the same thing. If I just try npm install, the modules folder gets created in my project folder, but it's empty, whereas earlier today it could successfully install all modules from the package json.



    In the end I literally uninstalled Ubuntu (with the home folder), restarted my PC, installed Ubuntu again, restarted again, installed node.js in the subsystem, and I am still getting the same error with npm.










    share|improve this question















    marked as duplicate by N0rbert, Fabby, karel, Eric Carvalho, muru Dec 7 at 4:27


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite












      This question already has an answer here:




      • How to install the latest versions of NodeJS and NPM?

        19 answers



      • How do I enable the “Universe” repository?

        4 answers




      I'm using Ubuntu on Windows 10, and was working with Node.js earlier today. It was my first time using node, so I had just installed it (it's installed on the subsystem). All npm commands worked fine too.
      Then I accidentally closed the terminal, reopened it and some commands weren't working. I reinstalled node, but I couldn't get npm to work. When I do



      sudo apt-get install nmp  


      I get



      The following packages have unmet dependencies:
      npm : Depends: nodejs but it is not going to be installed"


      with a list of like 20 other dependencies, and the last line is



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


      I tried every single solution I found on Stack Overflow. I tried removing and installing different versions of nodejs, I tried installing with --fix-broken, autocleaning, removing, updating, upgrading, -f install. I tried removing and installing the packages from the list one by one. I still get the same thing. If I just try npm install, the modules folder gets created in my project folder, but it's empty, whereas earlier today it could successfully install all modules from the package json.



      In the end I literally uninstalled Ubuntu (with the home folder), restarted my PC, installed Ubuntu again, restarted again, installed node.js in the subsystem, and I am still getting the same error with npm.










      share|improve this question
















      This question already has an answer here:




      • How to install the latest versions of NodeJS and NPM?

        19 answers



      • How do I enable the “Universe” repository?

        4 answers




      I'm using Ubuntu on Windows 10, and was working with Node.js earlier today. It was my first time using node, so I had just installed it (it's installed on the subsystem). All npm commands worked fine too.
      Then I accidentally closed the terminal, reopened it and some commands weren't working. I reinstalled node, but I couldn't get npm to work. When I do



      sudo apt-get install nmp  


      I get



      The following packages have unmet dependencies:
      npm : Depends: nodejs but it is not going to be installed"


      with a list of like 20 other dependencies, and the last line is



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


      I tried every single solution I found on Stack Overflow. I tried removing and installing different versions of nodejs, I tried installing with --fix-broken, autocleaning, removing, updating, upgrading, -f install. I tried removing and installing the packages from the list one by one. I still get the same thing. If I just try npm install, the modules folder gets created in my project folder, but it's empty, whereas earlier today it could successfully install all modules from the package json.



      In the end I literally uninstalled Ubuntu (with the home folder), restarted my PC, installed Ubuntu again, restarted again, installed node.js in the subsystem, and I am still getting the same error with npm.





      This question already has an answer here:




      • How to install the latest versions of NodeJS and NPM?

        19 answers



      • How do I enable the “Universe” repository?

        4 answers








      package-management nodejs windows-subsystem-for-linux npm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 6 at 18:48









      Zanna

      49.4k13128236




      49.4k13128236










      asked Dec 4 at 23:56









      Arda

      1




      1




      marked as duplicate by N0rbert, Fabby, karel, Eric Carvalho, muru Dec 7 at 4:27


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






      marked as duplicate by N0rbert, Fabby, karel, Eric Carvalho, muru Dec 7 at 4:27


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





























          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕