bash: /usr/bin/npm: No such file or directory
2103 단어 Directory
apt-get install npm
으로 설치 하면 다음 과 같은 오 류 를 얻 을 수 있 습 니 다.The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: nodejs-dev
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
홈 페이지 에서 이런 방법 만 제공 하 다 니 github 홈 페이지 에서 제공 하 는 방법 은
curl -L https://npmjs.com/install.sh | sh
성공 한 것 으로 나 타 났 다.여전히 사용 할 수 없 음:
npm -v
bash: /usr/bin/npm: No such file or directory
한바탕 뒤 져 보 았 지만 여러 가지 해결 방법 에 대해 함부로 시도 해 보 았 지만 진정 으로 해결 되 지 않 았 다. 그것 은 스스로 생각해 볼 수 밖 에 없 었 다.
root@walker:~# find / -name "npm-cli.js"
/root/.node/lib/node_modules/npm/bin/npm-cli.js
root@walker:~# /root/.node/lib/node_modules/npm/bin/npm-cli.js -v
2.1.17
root@walker:~# ln -s /root/.node/lib/node_modules/npm/bin/npm-cli.js /usr/bin/npm
root@walker:~# npm -v
2.1.17
p. s. npm 가 정상적으로 작 동 했 지만 npm install 은 가방 하나 도 내리 지 못 하고 한 마디
npm cache clean
를 실 행 했 습 니 다. 괜 찮 은 것 같 습 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
LD_LIBRARY_PATH shouldn't contain the current directory when building glibc. Please change the envir실행 #./glibc-2.14/configure에서 다음 오류가 발생했습니다. 문제 분석: LD_LIBRARY_PATH는 현재 디렉터리를 포함할 수 없습니다. 환경 변수를 수정하고 configure를 다시 실행하십시...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.