Before you install any package in ubuntu you need to run three commands
1> sudo dpkg --configure -a
2> sudo apt-get update
3> sudo apt-get upgrade
you have to execute these commands in sequence.after executing these commands
go to synaptic software center in ubuntu and select any package which you want to install.