Appium_npm install -g appium please try running this command again as root/Administrator

Am trying to install appium in ubuntu and got the below error.I searched so many articles and installed node through linuxbrew and even changed the permission also but still getting the below error.Can any one help please

npm ERR! tar.unpack untar error /home/ubuntu/.npm/appium/1.3.6/package.tgz

npm ERR! Linux 3.13.0-44-generic

npm ERR! argv “node” “/home/ubuntu/.linuxbrew/bin/npm” “install” “-g” “appium”

npm ERR! node v0.12.0

npm ERR! npm v2.5.1

npm ERR! path /home/ubuntu/lib/node_modules/appium

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! Error: EACCES, mkdir ‘/home/ubuntu/lib/node_modules/appium’

npm ERR! at Error (native)

npm ERR! { [Error: EACCES, mkdir ‘/home/ubuntu/lib/node_modules/appium’]

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! path: ‘/home/ubuntu/lib/node_modules/appium’,

npm ERR! fstream_type: ‘Directory’,

npm ERR! fstream_path: ‘/home/ubuntu/lib/node_modules/appium’,

npm ERR! fstream_class: ‘DirWriter’,

npm ERR! fstream_stack:

npm ERR! [ ‘/home/ubuntu/.linuxbrew/lib/node_modules/npm/node_modules /fstream/lib/dir-writer.js:36:23’,

npm ERR! ‘/home/ubuntu/.linuxbrew/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53’,

npm ERR! ‘FSReqWrap.oncomplete (fs.js:99:15)’ ] } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:

npm ERR! /home/ubuntu/npm-debug.log

I have tried npm cache clean also but still not working.

1 Like