Appium 命令列模式下遇到的問題總結及解決方案 npm ERR! tar.unpack unzip(或者untar) error

阿里瓜瓜發表於2017-09-06

安裝了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

 

相關文章