Appium 命令行模式下遇到的问题总结及解决方案 npm ERR! tar.unpack unzip(或者untar) error

安装了GUI Appium后,卸载删除问题后,使用命令行模式安装。

一、

遇到问题:

nalideMacBook-Pro:~ nali$ npm install -g appium
npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "appium"
npm ERR! node v6.11.3
npm ERR! npm  v3.10.10

npm ERR! shasum check failed for /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/npm-518-971972a3/registry.npmjs.org/appium/-/appium-1.6.5.tgz
npm ERR! Expected: cab50da890e9d2df9a25178fb1a8d802bf5c81e3
npm ERR! Actual:   303a7bb09848c6d6f4cfcabd60065a4d32beca4f
npm ERR! From:     https://registry.npmjs.org/appium/-/appium-1.6.5.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

解决方案:FQ外网

二、连接外网后遇到问题:

nalideMacBook-Pro:~ nali$ npm install -g appium
npm ERR! tar.unpack unzip error /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/npm-610-3a74b3f1/registry.npmjs.org/core-js/-/core-js-1.2.7.tgz
npm ERR! tar.unpack unzip error /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/npm-610-3a74b3f1/registry.npmjs.org/appium-adb/-/appium-adb-2.23.0.tgz

 参考解决方法:

 (1)来源简书,依然存在如上问题如图:

nalideMacBook-Pro:~ nali$ npm -g --registry http://registry.cnpmjs.org install appium
npm ERR! tar.unpack unzip error /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/npm-704-4c10202c/registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz
[    ..............] - loadRequestedDeps: ERR! tar.unpack unzip error /var/folders/gs/1rvd4dj94

(2)来源StackOverflow,上找到了解决方案:

  运行命令:$ npm cache clean

      然后运行npm install -g appium

 

posted @ 2017-09-06 17:03  蒋励  阅读(395)  评论(0编辑  收藏  举报