Steps to Setup Appium on Ubuntu
Pre-requisites for Appium setup on Ubuntu:
Install Java on Ubuntu
Set Environment Variables for Java
Check that whether java is installed on the system or not by typing java on the terminal.
Install Android SDK on Ubuntu
Setup Path for Android SDK (ANDROID_HOME, Platform-tools, and Tools)
Check that whether android is installed on the system or not by typing adb on the command prompt.
Steps to Setup Appium on Ubuntu (Without using npm) [Recommended]:
Step 1. : Install ruby
Paste the below mentioned command on 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
Step 2. Install linuxbrew
Paste the below command at terminal and press enter
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
Step 3. Setup path for brew
Type gedit .bashrc on terminal, copy & paste below commands into the .bashrc file
export PATH=”$HOME/.linuxbrew/bin:$PATH”
export MANPATH=”$HOME/.linuxbrew/share/man:$MANPATH”
export INFOPATH=”$HOME/.linuxbrew/share/info:$INFOPATH”
After Copy and Paste the above command save the file and close it.
Step 4. Install node
To install brew, paste the below commands one by one at terminal and press enter button
sudo apt install linuxbrew-wrapper
“brew” installation:
brew update
brew install node
brew link node
Step 5. Install Appium
To install Appium, type below mentioned command in terminal
npm install -g appium
npm install wd
Step 6. To verify “Appium” installation we can use appium-doctor. For this, we have to install appium doctor using npm.
npm install -g appium-doctor
Run appium-doctor: It will display all the configuration information required to setup appium.
appium-doctor
Step 7. To start appium
Type “appium” into the terminal and press enter button.
Conclusion:
Hopefully, we all successful setup appium on Ubuntu Machine.
This was really great to read. Thank you!
Hi, I have successfully installed JAVA, Android SDK and node. but when enter “npm install -g appium” command it give below error. Please help me for the same.
npm WARN optional Skipping failed optional dependency /appium/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.1.2
npm ERR! Linux 4.10.0-32-generic
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “appium”
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib’
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib’]
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib’ }
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/bhavin/npm-debug.log
Please use Sudo command to install appium
Even is we use sudo npm install -g Appium
:> appium-chromedriver@3.0.1 install /usr/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js
(node:27320) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/appium/node_modules/appium-chromedriver/20171110-27320-12ss9pw.0cbb’
(node:27320) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info Chromedriver Install Installing Chromedriver version ‘2.30’ for platform ‘linux’ and architecture ’64’
info Chromedriver Install Opening temp file to write chromedriver_linux64 to…
Error: EACCES: permission denied, mkdir ‘/usr/lib/node_modules/appium/node_modules/appium-chromedriver/20171110-27320-1lkkes0.so17’
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/appium/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:”darwin”,”arch”:”any”} (current: {“os”:”linux”,”arch”:”x64″})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@3.0.1 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@3.0.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Hi Kashyap,
I Reinstall all dependency but my issue was not solve.
Finally, I did. I installed Android Studio and set ANDROID_HOME path.
Thanks.
I’m facing error”Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path”
Open terminal and open bashrc file using “gedit .bashrc” command.
Enter below mentioned command at the end of the file and save. “Restart your system once”.
export ANDROID_HOME=’/home/sahil/Softwares/android-sdk-linux’
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
export JAVA_HOME=/usr/lib/jvm/java-9-oracle/bin
export PATH=$JAVA_HOME/bin:$PATH
Hello Sir, I am facing this issue.. when I Install ruby
HEAD is now at 851177a docs: update gems. (#569)
/usr/lib/ruby/1.9.1/rubygems/version.rb:191:in `strip!’: can’t modify frozen String (RuntimeError)
from /usr/lib/ruby/1.9.1/rubygems/version.rb:191:in `initialize’
from -e:1:in `new’
from -e:1:in `’
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:12:in `’: Homebrew must be run under Ruby 2.3! You’re running 1.9.3. (RuntimeError)
Failed during: /home/linuxbrew/.linuxbrew/bin/brew update –force
run using admin right. using “sudo” command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@3.1.4 install: `node install-npm.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@3.1.4 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/beat/.npm/_logs/2018-01-30T23_40_58_771Z-debug.log
run using admin right. using “sudo” command.
same issue i am facing but it didn’t resolved with sudo also
Can you Please provide the steps for Appium integration with Eclipse on ubuntu.
Welcome to Appium v1.9.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
After that Appium is not ruuning or working
You are Genius. Not even one of the websites were crisp and clear like this. Keep rocking.