2

I used this command to install Appium on my machine:

npm install -g appium

& I got this error:

npm ERR! Error: EACCES, unlink '/usr/lib/node_modules/appium'
npm ERR!  { [Error: EACCES, unlink '/usr/lib/node_modules/appium']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/lib/node_modules/appium' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.13.0-48-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "appium"
npm ERR! cwd /home/asus
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! path /usr/lib/node_modules/appium
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/lib/node_modules/appium'
npm ERR! error rolling back Error: EACCES, unlink '/usr/lib/node_modules/appium'
npm ERR! error rolling back  { [Error: EACCES, unlink '/usr/lib/node_modules/appium']
npm ERR! error rolling back   errno: 3,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/usr/lib/node_modules/appium' }
npm ERR! not ok code 0

How can I resolve this problem?

serenesat
  • 4,611
  • 10
  • 37
  • 53
Ajit
  • 21
  • 3
  • You can get some idea from here : http://stackoverflow.com/questions/22374416/how-to-setup-appium-in-ubuntu-for-android – serenesat Apr 07 '15 at 12:29

1 Answers1

1

Linux: • Download and install Latest Java from http://www.oracle.com/technetwork/java/javase/downloads/index.html • Download and install latest Android SDK from http://developer.android.com/sdk/index.html • Configure path to ANDROID_HOME and JAVA_HOME in .bash profile • Configure path to Platform-tools and tools folder in .bash profile • Use command gedit.bashrc to open bash profile

Steps to get appium working on ubuntu pc :

Install ruby: Paste the below command at terminal and hit enter

sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
Install linux brew:Paste the below command at terminal and hit enter 
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"

set path for brew

Type: gedit.bashrc at terminal and copy paste following into the .bashrc file

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

Install node:Paste the below commands one by one at terminal and hit enter

brew update
brew install node
brew link node

Install appium

npm install -g appium


npm install wd

To start appium: Paste the below command at terminal and hit enter

appium
krishna chetan
  • 659
  • 1
  • 10
  • 20
  • Thank you for sharing. But when i tried this "brew update" I got this "No command 'brew' found" . I searched the Ubuntu forums but did not get exact solution for brew command. – Ajit Apr 09 '15 at 06:37
  • ADD this to your .bahrc profile export PATH="$HOME/.linuxbrew/bin:$PATH" export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH" export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH" – krishna chetan Apr 09 '15 at 11:04