I installed nvm n and now I keep getting “dyld: bad external relocation length”

梦想与她 提交于 2019-12-06 05:04:29

问题


I installed nvm, n, using sudo and decided to test it out by downloading several versions of node on my system. When I tried to switch between the node versions I kept getting "Permissions denied." So I decided to sudo the command for switching between versions too. That's when all hell broke loose. I keep getting

dyld:bad external relocation length

I've tried to reboot my terminal with some hope that it would magically fix itself out. Alas, I was wrong.Thanks in Advance.

Update 1: I've tried to use npm to install yo and it gives me the same "dyld" prompt, along with the following:

Trace/BPT trap: 5

Essentially I can't use npm anymore.


回答1:


I had the same thing happen.

I was using a mac, so I downloaded the .pkg for the version of node I was interested in and re-installed it (which reinstalls npm at the same time).

Everything was back up and running after that.




回答2:


I had the same this morning because of n package via npm,

Node was installed via brew (without npm), so i removed it this way;

brew uninstall node

then reinstalled the newer version via n package

n lts

if this is not enough because of policy rules of your mac, try

sudo npm lts

this solved my problem and saved a big time from reinstalling all global node modules.




回答3:


Just use n reinstall node that you break in.




回答4:


i solved my problem wihout uninstalling the nodejs,just update the node version by n, and it works.

sudo n latest


来源:https://stackoverflow.com/questions/29099767/i-installed-nvm-n-and-now-i-keep-getting-dyld-bad-external-relocation-length

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!