Requirements

Your environment needs to be setup for the particular mobile platforms that you want to run tests on. See below for particular platform requirements.
If you want to run Appium via an npm install, hack with or contribute to Appium, you will need node.js and npm 0.10 or greater (use n or brew install node to install Node.js. Make sure you have not installed Node or Appium with sudo, otherwise you'll run into problems). We recommend the latest stable version.

1. Install Brew

git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
Until LinuxBrew is fixed, the following is required.
See: Linuxbrew/linuxbrew#47
nano ~/.bashrc
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH

Setup linux brew

export LINUXBREWHOME=$HOME/.linuxbrew
export PATH=$LINUXBREWHOME/bin:$PATH
export MANPATH=$LINUXBREWHOME/man:$MANPATH
export PKG_CONFIG_PATH=$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH
test the following after logout and login
$ which brew

2. Install Node

brew update
brew install node
brew link node

3. Install Appium

$ npm install -g appium

4. Run appium

appium &
Important: Uninstall the node / appium that you have installed previously.