Steps to Setup Appium on Ubuntu

Steps to Setup Appium on Ubuntu

Appium setup on Ubuntu operating system is quite different from setting up on Appium on Windows OS and Mac OS. To overcome the load below are the steps to setup Appium on Ubuntu machine.

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.

JavaLinux

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.

adb

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.

GeditBashrc

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

LinuxBrew Install

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

 

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

appium_doctor

Step 7. To start appium

Type “appium” into the terminal and press enter button.

KEshavAppium

 

Conclusion:

Hopefully, we all successful setup appium on Ubuntu Machine.

10 thoughts on “Steps to Setup Appium on Ubuntu

  • 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

  • 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

  • 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

Leave a Reply

%d bloggers like this: