注意:在0.18版本之后,安装的appium 和 nodejs时不能使用sudo方法,所以解决方法就是修改相关目录的权限;
当执行brew install node 时,会提示某个目录没有权限,可以通过sudo chown -Rf admin:staff /usr/local(admin为用户名)修改相应目录权限,之后修改几个文件的权限后就可以顺利安装成功了,这时候再安装appium时就可以不用sudo了
1、Mac OS X 中安装 brew:http://webmedia.blog.163.com/blog/static/416695020123261226695/
2、appium_mac上环境搭建:http://www.tuicool.com/articles/jU3En2
3、node.js安装时问题解决办法:
http://www.developpeers.com/blogs/fix-for-homebrew-permission-denied-issues
sudo chown -R `whoami` /usr/local
Password:
~ phabi$ brew link --overwrite node
4、安装完node.js中没有安装npm,单独安装nps
curl https://npmjs.org/install.sh | sh
如果没有成功,见下面解决方案。
You are getting the install.sh script, you just have to execute it. Do this
curl -O https://npmjs.org/install.sh
sudo sh install.sh
Update
If you get a 301 Moved Permanently file instead, try adding -L option to follow the redirect like this:
curl -O -L https://npmjs.org/install.sh
5、appium示例:http://blog.csdn.net/Testingba/article/category/2184053