2013-07-13 5 views
0

https://github.com/mscdex/ssh2에서 sudo npm install ssh2 명령을 실행하여 ssh2를 설치하려고합니다. 내가 NVM 및 노드 v0.10.13을 사용하고,하지만 난 현재 노드 v0.6.19을 사용하고 있다는 오류가 표시ssh2 노드 모듈을 설치할 수 없습니다.

ERR! Error: No compatible version found: ssh2 
ERR! No valid targets found. 
ERR! Perhaps not compatible with your version of node? 
ERR!  at installTargetsError (/usr/share/npm/lib/cache.js:488:10) 
ERR!  at next_ (/usr/share/npm/lib/cache.js:438:17) 
ERR!  at next (/usr/share/npm/lib/cache.js:415:44) 
ERR!  at /usr/share/npm/lib/cache.js:408:5 
ERR!  at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7) 
ERR!  at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7) 
ERR! You may report this log at: 
ERR!  <http://bugs.debian.org/npm> 
ERR! or use 
ERR!  reportbug --attach /home/iwan/dev/workspace-nodejs/db-backup/npm-debug.log npm 
ERR! 
ERR! System Linux 3.8.0-26-generic 
ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "ssh2" 
ERR! cwd /home/iwan/dev/workspace-nodejs/db-backup 
ERR! node -v v0.6.19 
ERR! npm -v 1.1.4 
ERR! message No compatible version found: ssh2 
ERR! message No valid targets found. 
ERR! message Perhaps not compatible with your version of node? 
verbose exit [ 1, true ] 

다음과 같이 그러나 그것은 오류를 보여줍니다.

node -v 
v0.10.13 

어떻게됩니까?

+0

어쩌면'NVM 사용 0.10.13'? – gustavohenke

+0

나는 이미 그 명령을 실행했다. 아직도 작동하지 않는다는 것은 동일한 오류가 발생했다는 의미입니다. –

답변

1

시도 : npm install ssh2

+0

좋아요! 그것은 작동합니다! 고맙습니다. @mscdex –

0

예, ssh2에 노드 >=0.8.7이 필요하며 PATH 및/또는 nvm 설정으로 인해 노드 v0.6에서 실행중인 npm의 이전 버전을 실행하게됩니다. 그것은 확실히 문제입니다. 그냥 npm 대신 전체 파일 시스템 경로를 사용하여 npm의 특정 버전을 설치하고 올바르게 실행하면 문제를 해결할 수 있습니다. sudo는없는

관련 문제