Appium 安装权限问题解决方案
作者:ata360 发布时间:[ 2017/1/4 11:24:03 ] 推荐标签:软件测试工具 Appium 自动化测试
安装appium时一直报下面的错,使用sudo安装appium能够安装,但运行不起来。
请大神指点一下,如何挽救....
解决方法:
1、卸载appium 和nodejs(dmg安装无需卸载)
2、sudo chmod -R 777 /usr/local (不知道是否一定要到这个目录,或许只需要修改到lib目录可以了)
3、重新安装 appium
localhost:temp test2$ npm install -g appium
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/appium'
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/appium']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/appium',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/appium',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "appium"
npm ERR! cwd /Users/test2/temp
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path /usr/local/lib/node_modules/appium
npm ERR! fstream_path /usr/local/lib/node_modules/appium
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/appium'
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/test2/temp/npm-debug.log
npm ERR! not ok code 0
localhost:temp test2$
使用sudo安装的appium,执行的时候报错
ocalhost:temp test2$ appium
error: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using sudo npm install -g appium, the solution is to reinstall Node using a method (Homebrew, for example) that doesn't require sudo to install global npm packages.
localhost:temp test2$ sudo appium
error: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using sudo npm install -g appium, the solution is to reinstall Node using a method (Homebrew, for example) that doesn't require sudo to install global npm packages.
相关推荐
更新发布
功能测试和接口测试的区别
2023/3/23 14:23:39如何写好测试用例文档
2023/3/22 16:17:39常用的选择回归测试的方式有哪些?
2022/6/14 16:14:27测试流程中需要重点把关几个过程?
2021/10/18 15:37:44性能测试的七种方法
2021/9/17 15:19:29全链路压测优化思路
2021/9/14 15:42:25性能测试流程浅谈
2021/5/28 17:25:47常见的APP性能测试指标
2021/5/8 17:01:11