Appium appium 命令行安装问题,求助!

阿鸿 · May 10, 2017 · Last by 头大点怎么了 replied at July 23, 2018 · 4572 hits

下是终端显示,请问,我应该怎么解决?

 npm --registry http://registry.cnpmjs.org install -g appium
/usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js

> appium-chromedriver@2.11.0 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js

info Chromedriver Install Installing Chromedriver version '2.28' for platform 'mac' and architecture '64'
info Chromedriver Install Opening temp file to write chromedriver_mac64 to...
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.28/chromedriver_mac64.zip...
RequestError: Error: connect ETIMEDOUT 64.233.162.83:443
at new RequestError (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/errors.js:11:15)
at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/rp.js:60:32)
at self.callback (/usr/local/lib/node_modules/appium/node_modules/request/request.js:188:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (/usr/local/lib/node_modules/appium/node_modules/request/request.js:884:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at TLSSocket.socketErrorListener (_http_client.js:267:9)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at emitErrorNT (net.js:1253:8)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
/usr/local/lib
└── (empty)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "--registry" "http://registry.cnpmjs.org" "install" "-g" "appium"
npm ERR! node v4.4.5
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1

npm ERR! appium-chromedriver@2.11.0 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@2.11.0 install script 'node install-npm.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the appium-chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install-npm.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs appium-chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls appium-chromedriver
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/zhengjiaohong/.npm/_logs/2017-05-10T09_54_27_758Z-debug.log
共收到 11 条回复 时间 点赞

可以看看我这篇帖子: macOS 下的 Appium 安装与配置
https://testerhome.com/topics/8375

阿鸿 #2 · May 10, 2017 作者
mark 回复
   java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
~ git --version
git version 2.8.4 (Apple Git-73)
~ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin15]
~ brew -v
Homebrew 1.2.0
Homebrew/homebrew-core (git revision 2d9a; last commit 2017-05-09)
~ npm -v
4.2.0

这些的安装都没问题,就是安装appium的时候出错了。

阿鸿 #3 · May 10, 2017 作者

从提示上可以看出似乎是在👇这个地方的错误,但是这种连接错误怎么造成的,怎么解决。

info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.28/chromedriver_mac64.zip...
RequestError: Error: connect ETIMEDOUT 64.233.162.83:443

装 cnpm

阿鸿 回复

你的 nodejs 是用brew装的吗, 不过不是, 在运行 npm时前面加上sudo

阿鸿 #6 · May 10, 2017 作者
云霄 回复

谢谢 可以执行下去了,但是还是经常会出现连接问题,有没有更好的办法

Tried too many times to install UiAutomator2, failing Original error: Error: connect ETIMEDOUT 54.231.34.41:443

阿鸿 #7 · May 10, 2017 作者
mark 回复

sudo 试过 没有效果还是一样出现问题

阿鸿 回复

我是ubuntu下安装报错 RequestError: Error: connect ECONNREFUSED
楼主解决了吗?是不是需要***才能安装?

用cnpm 去安装,貌似就没问题了

同问怎么解决的?我也报同样的错误了:
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.33/chromedriver_mac64.zip...
RequestError: Error: read ETIMEDOUT
at new RequestError (/usr/local/lib/node_modules/appium/node_modules/request-promise/lib/errors.js:11:15)
at Request.RP$callback as _callback

我也遇到这个问题了,楼主怎么解决的?
Error: EACCES: permission denied, mkdir '/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/appium-chromedriver/2018623-6444-16kgu7l.xmmq'
(node:6444) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info Chromedriver Install Installing Chromedriver version '2.30' for platform 'mac' and architecture '64'
info Chromedriver Install Opening temp file to write chromedriver_mac64 to...
Error: EACCES: permission denied, mkdir '/usr/local/Cellar/nvm/0.33.11/versions/node/v8.9.3/lib/node_modules/appium/node_modules/appium-chromedriver/2018623-6444-14f0ega.8opl'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@3.0.1 install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@3.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up