1
我正試圖在Ubuntu上安裝derbyjs。 我做的:無法安裝derbyjs:「找不到兼容版本」
sudo npm install -g derby
但我得到這個:
<200 response code here>
npm ERR! error installing [email protected]
npm http GET https://registry.npmjs.org/browser-resolve/-/browser-resolve-0.1.1.tgz
npm ERR! error installing [email protected]
<200 response code here>
npm ERR! error installing [email protected]
<200 response code here>
npm ERR! Error: No compatible version found: [email protected]'>=0.1.7- <0.2.0-'
npm ERR! Valid install targets:
npm ERR! ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"]
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/imkost/node/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "derby"
npm ERR! cwd /home/imkost/node
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message No compatible version found: [email protected]'>=0.1.7- <0.2.0-'
npm ERR! message Valid install targets:
npm ERR! message ["0.0.0","0.1.0","0.1.1","0.1.2","0.1.3"]
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/imkost/node/npm-debug.log
npm not ok
我無法弄清楚什麼是錯的。有任何想法嗎?
nodejs version: 0.10.22
npm version: 1.3.15
奇怪的事情。我剛剛嘗試過你所說的:'npm install derby'。沒有錯誤。然後嘗試'npm install -g derby'。沒有錯誤。所以,這個問題是通過**不使用sudo **來解決的。爲什麼?我不知道。感謝幫助! – imkost
不要使用'sudo'來安裝npm,即使是全局模塊,也要設置npm使用'/ usr/local/npm'或其他東西。 'chmod'/ usr/local'到你的用戶帳戶,這樣你就不必使用'sudo'。我不認爲不使用'sudo'使它工作,但可能是由於鎖定文件,不能肯定地說。 – vmx