brew install node 오류

young·2022년 2월 7일

문제 발생 >

$ brew install node@14
$ node -v
command not found: node

특정 버전으로 노드 설치 후 노드 버전 확인하면 노드가 없다고 노출된다.



$ brew install node@14
Warning: node@14 14.19.0 is already installed and up-to-date.
To reinstall 14.19.0, run:
brew reinstall node@14

재설치 시도해보면 이미 설치되어있다고 reinstall 명령어를 사용하라고 뜸..
reinstall 해도 동일 현상 발생..


$ brew uninstall node  

Error: No such keg: /usr/local/Cellar/node

삭제 후 재설치 하려고 삭제 시도하면
Error: No such keg: /usr/local/Cellar/node
라는 에러 발생. 어쩌라는거임



$ brew link node
Error: No such keg: /usr/local/Cellar/node

구글링 해보니 링크를 하라길래 링크를 시도했으나
열받기 시작함



해결 과정 >

$ brew link node
Error: No such keg: /usr/local/Cellar/node
$ brew link node@14
Warning: node@14 is keg-only and must be linked with --force

뒤에 설치한 버전을 붙여서 link 시도하길래 시도해봄



$ brew link node@14

Linking /usr/local/Cellar/node@14/14.19.0... 
Error: Could not symlink share/doc/node/gdbinit
Target /usr/local/share/doc/node/gdbinit
already exists. You may want to remove it:
  rm '/usr/local/share/doc/node/gdbinit'

To force the link and overwrite all conflicting files:
  brew link --overwrite node@14

To list all files that would be deleted:
  brew link --overwrite --dry-run node@14  

실패..
에러 메세지에 쓰여있는 대로 링크 시도


$ brew link --overwrite node@14
$ node -v
v14.19.0

후 노드 버전 확인해보면 정상 노출..



결론 >

나처럼 특정 버전을 설치한 경우에는 link 시도시 해당 버전을 꼭 명시해주자..

profile
hello world

0개의 댓글