2016-04-26 87 views
0

我試圖對Ubuntu的15.0運行我的機器指導下http://madebyknight.com/installing-phonegapcordova-windows-linux/無法在系統上安裝科爾多瓦/ PhoneGap的15.04

我也曾嘗試以下兩個指南,但遇到了同樣的問題,安裝科爾多瓦/ PhoneGap的

http://dasunhegoda.com/installrun-phonegap-ubuntu/797/

http://www.levibotelho.com/development/the-complete-guide-to-running-phonegap-on-ubuntu

同時運行此命令,所有我得到的是下面的結果

命令:

npm install –g [email protected] 
npm install –g [email protected] 

結果:

npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm ERR! 404 Not Found 
npm ERR! 404 
npm ERR! 404 '–g' is not in the npm registry. 
npm ERR! 404 You should bug the author to publish it 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, or http url, or git url. 

npm ERR! System Linux 3.19.0-15-generic 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "–g" "[email protected]" 
npm ERR! cwd /home/user 
npm ERR! node -v v0.10.25 
npm ERR! npm -v 1.4.21 
npm ERR! code E404 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/user/npm-debug.log 
npm ERR! not ok code 0 


npm WARN package.json [email protected] No description 
npm WARN package.json [email protected] No repository field. 
npm WARN package.json [email protected] No README data 
npm ERR! 404 Not Found 
npm ERR! 404 
npm ERR! 404 '–g' is not in the npm registry. 
npm ERR! 404 You should bug the author to publish it 
npm ERR! 404 
npm ERR! 404 Note that you can also install from a 
npm ERR! 404 tarball, folder, or http url, or git url. 

npm ERR! System Linux 3.19.0-15-generic 
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "–g" "[email protected]" 
npm ERR! cwd /home/user 
npm ERR! node -v v0.10.25 
npm ERR! npm -v 1.4.21 
npm ERR! code E404 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/user/npm-debug.log 
npm ERR! not ok code 0 

任何幫助理解。

+0

你的問題解決了嗎? – HardikDG

+0

不好意思@Pyro –

回答

0

您的nodejs安裝無法正常工作。嘗試重新安裝nodejs,然後執行此命令。如果你看一下錯誤,它並不能夠識別-g全局開關指示與您的NodeJS

+0

我已經多次重新安裝nodejs,但又面臨同樣的問題....感謝您的回覆 –

0

看起來像您使用在本提到的錯誤連字符標誌問題和NPM: https://github.com/npm/npm/issues/1859,應手動鍵入在終端命令(特別是-g),或嘗試sudo npm install -g [email protected]它可能工作

如果你仍然有同樣的錯誤這個網址可以幫助你:http://www.himpfen.com/install-apache-cordova-ubuntu/

首先檢查是否是通過檢查nodejs -v如果正確安裝NPM它的工程嘗試安裝嘗試下一步安裝科爾多瓦