linux 卸载nodejs,完全卸载Ubuntu 14.04中的nodejs,npm和node

I know this question has been asked many times but I couldn't still do it.

So I wrongly installed "node" doing sudo apt-get install node And later I installed nodejs (v0.10.37). I tried to update to v0.12 with npm but it keeps saying 0.10.37 when I do the nodejs -v. Also, I can't use the node command since i wrongly installed the other "node thing" before.

I tried all the different commands that the people talks about in all the other answers and I couldn't do it yet.

I think the main problem is that I keep having the wrong node package and installing the nodejs-legacy doesn't work.

Also the npm install command works and creates the folder with the files but my App still says that the libraries are missing.

解决方案sudo apt-get remove nodejs

sudo apt-get remove npm

Then go to /etc/apt/sources.list.d and remove any node list if you have. Then do a

sudo apt-get update

Check for any .npm or .node folder in your home folder and delete those.

If you type

which node

you can see the location of the node. Try which nodejs and which npm too.

I would recommend installing node using Node Version Manager(NVM). That saved a lot of head ache for me. Because you can install nodejs and npm without sudo using nvm.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值