컴공생의 다이어리

[Ubuntu] -bash: /usr/local/bin/node: No such file or directory, -bash: /usr/local/bin/npm: No such file or directory 본문

Development/Node.js & JavaScript

[Ubuntu] -bash: /usr/local/bin/node: No such file or directory, -bash: /usr/local/bin/npm: No such file or directory

컴공 K 2022. 10. 15. 00:01

[Ubuntu] -bash: /usr/local/bin/node: No such file or directory, -bash: /usr/local/bin/npm: No such file or directory

우분투에서 node와 npm을 삭제한 후, 다른 버전으로 재설치하고 나서 node -v와 npm -v 명령어를 입력해보니 -bash: /usr/local/bin/{node 혹은 npm}: No such file or directory 오류가 발생했다.

 

이를 아래 명령어를 통해 해결할 수 있었다.

# node의 경우
sudo ln -s "$(which nodejs)" /usr/local/bin/node

# npm의 경우
sudo ln -s "$(which npm)" /usr/local/bin/npm

 

 

 

 

 

 

 

 

 

https://github.com/130s/hut_10sqft/issues/294

 

[p50] /usr/bin/env: ‘node’: No such file or directory · Issue #294 · 130s/hut_10sqft

sudo apt install npm npm cache clean npm upgrade npm search dockerlint sudo npm install -g dockerlint dockerlint indigo_installed/Dockerfile /usr/bin/env: ‘node’: No such file or directory $ apt-ca...

github.com

 

728x90
Comments