运行appium报错:Appium will not wor… - 51ste软件测试部落-中国软件测试者的乐园
登录|注册

运行appium报错:Appium will not work if used or installed with sudo ?

楼主 caicai发布于:2018/03/30

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.

 

最佳答案 #1楼 stady回复于:2018/03/30

出错原因:
权限问题,无法使用sudo来运行appium
解决办法:
步骤1、改变node的所有者
cd /usr/local/lib
sudo chown -R [username] node_modules
步骤2、卸载appium
npm uninstall appium -g
步骤3、重新安装appium
npm install -g appium
步骤4. 启动
appium &
步骤5. 查看是否运行成功
浏览器打开:
http://0.0.0.0:4723/
显示:
That URL did not map to a valid JSONWP resource
说明成功

回复