4

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.

an1waukoni
  • 325
  • 4
  • 12

4 Answers4

5

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.

jackadams49
  • 146
  • 1
  • 5
  • You are right. I basically broke my node installation. The error messages apparently don't come from npm but from os x. I uninstalled npm, node, and n, then reinstalled using nvm. All is working now. – an1waukoni Mar 20 '15 at 00:23
0

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.

btargac
  • 392
  • 2
  • 10
0

Just use n reinstall node that you break in.

JK Bi
  • 407
  • 4
  • 9
0

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

sudo n latest
Feng Li
  • 9
  • 3