我尝试通过发出命令 sudo npm install ssh2 从https://github.com/mscdex/ssh2安装 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 ]
我正在使用 nvm 和节点 v0.10.13,但在错误中显示我当前正在使用节点 v0.6.19。
node -v
v0.10.13
发生什么事?