Search code examples
command-lineterminalnpmitermnvm

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


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.


Solution

  • 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.