According to qgis site if you want to install the latest release (recommended) :
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install qgis
If you're a newbie to the linux world you better avoid sudo as hell untill you know your way around.
If you've build qgis from source and you cant start it because it cant find its libraries follow the following:
Open the terminal and set LD_LIBRARY_PATH to /path/to/qgis/output/lib (ubuntu 12.04 doesn't use LD_LIBRARY_PATH by default, so it should be empty so you shouldn't be able to break anything - if you do just restart the shell), then start qgis by navigating to /path/to/qgis/output/bin and ./qgis
Here's a List with the steps.
- $ cd ~/path/to/output/bin
- $ LD_LIBRARY_PATH="~/path/to/output/lib"
- $ ./qgis
You can even create a script if you want:
- $ touch run_qgis.sh
- $ chmod +x run_qgis.sh
- enter in the first line
- insert the above steps from the previous list
- run the script! (./run_qgis.sh)