json - ubuntu中安装错误phonegap

标签 json node.js ubuntu cordova npm

我正在尝试在 ubuntu 12.04 中安装 phonegap。使用 this教导。但是出现了错误,

npm http GET https://registry.npmjs.org/npm/1.3.7
npm http 500 https://registry.npmjs.org/npm/1.3.7
npm ERR! registry error parsing json
npm http GET https://registry.npmjs.org/npm/1.3.7
npm http GET https://registry.npmjs.org/npm/1.3.7
npm ERR! Error: connect ECONNREFUSED
npm ERR!     at errnoException (net.js:901:11)
npm ERR!     at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR!  { [Error: connect ECONNREFUSED]
npm ERR!   code: 'ECONNREFUSED',
npm ERR!   errno: 'ECONNREFUSED',
npm ERR!   syscall: 'connect' }
npm ERR! 
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Linux 3.2.0-51-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "update" "-g"
npm ERR! cwd /home/mridul
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! stack Error: connect ECONNREFUSED
npm ERR! stack     at errnoException (net.js:901:11)
npm ERR! stack     at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/mridul/npm-debug.log
npm ERR! not ok code 0

最佳答案

我的解决方法是运行 make test从 node.js 文件夹。这表明我的系统中缺少 Curl。

sudo apt-get install curl

关于json - ubuntu中安装错误phonegap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18042458/

相关文章:

ubuntu - Dart Ubuntu Server 14.04 如何为 Dartium 安装缺少的库

javascript - 如何使用包含图像哈希的 jQuery 将数据从 JSON 文件显示到 Bootstrap 4 Carousel

java - 将具有多个对象的 JSON 字符串转换为类实例

node.js - Azure Web App 在交换期间丢弃请求

r - tsoutliers 依赖问题 : dependency KFKSDS has non-zero exit status?

ubuntu - 在终端执行python代码

java - 从 google maps DistanceMatrix api 在 android 中解析 JSON

Regex JSON 响应 Gatling 压力工具

javascript - 在 Electron 应用程序中为 TypeScript 编译器选择哪个 ECMAScript 版本?

node.js - Karma 出现 ReferenceError : Can't find variable: module on the karma config file itself 错误