I installed nvm n and now I keep getting “dyld: ba

2019-04-09 16:20发布

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.

4条回答
▲ chillily
2楼-- · 2019-04-09 16:32

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.

查看更多
爷的心禁止访问
3楼-- · 2019-04-09 16:45

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.

查看更多
老娘就宠你
4楼-- · 2019-04-09 16:52

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

sudo n latest
查看更多
叼着烟拽天下
5楼-- · 2019-04-09 16:57

Just use n reinstall node that you break in.

查看更多
登录 后发表回答