无法在Ubuntu

时间:2015-07-14 21:23:12

标签: node.js ubuntu appium

我是移动自动化的初学者 今天我从https://github.com/appium/appium/releases

下载了Appium的源代码

并安装了nodejs(v0.10.37)

尝试启动Appium后出现错误(通过./reset.sh --verbose)

* Determining platform
* Platform is linux
 ---- Resetting / Initializing Appium ----
RESETTING NPM
* Installing new or updated NPM modules (including devDeps)
npm ERR! fetch failed https://registry.npmjs.org/body-parser/-/body-parser-1.12.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/bplist-creator/-/bplist-creator-0.0.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/camel-back-promise/-/camel-back-promise-1.0.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/bufferpack/-/bufferpack-0.0.6.tgz
npm ERR! fetch failed https://registry.npmjs.org/colors/-/colors-1.0.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/appium-xcode/-/appium-xcode-2.0.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/date-utils/-/date-utils-1.2.17.tgz
npm ERR! fetch failed https://registry.npmjs.org/es6-promise/-/es6-promise-2.3.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/express/-/express-4.11.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/glob/-/glob-4.4.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/js2xmlparser2/-/js2xmlparser2-0.2.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/grunt-cli/-/grunt-cli-0.1.13.tgz
npm ERR! fetch failed https://registry.npmjs.org/longjohn/-/longjohn-0.2.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/argparse/-/argparse-1.0.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/async/-/async-0.9.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/md5calculator/-/md5calculator-0.0.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/method-override/-/method-override-2.3.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/morgan/-/morgan-1.5.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/mv/-/mv-2.0.3.tgz

blablabla

npm ERR! fetch failed https://registry.npmjs.org/appium-adb/-/appium-adb-1.7.5.tgz
npm ERR! network tunneling socket could not be established, cause=connect ECONNREFUSED
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network 
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! System Linux 3.16.0-38-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "."
npm ERR! cwd /home/cherevychenkosa/Downloads/appium-1.4.6
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/cherevychenkosa/Downloads/appium-1.4.6/npm-debug.log
npm ERR! not ok code 0
---- FAILURE: reset.sh exited with status 1 ----

1 个答案:

答案 0 :(得分:0)

可能你是代理人,这是我的问题。可能是一个真正的痛苦。让npm在代理后面工作需要设置代理 https-proxy 设置。

打开命令提示符或终端会话并运行以下命令以配置npm以使用您的代理。这些命令使用 proxy.company.com 作为地址, 8080 作为端口。

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

原始post