Its easy to install phpmyadmin in normal case but in some case you have to go through the following command.
For normal case
sudo apt-get install phpmyadmin
but in some cases although the installation is successful, you can’t access phpmyadmin panel by localhost/phpmyadmin on browser. For that case just add one line below in apache2.conf file.
gksu gedit /etc/apache2/apache2.conf
Then add the following line to the end of the file.
Then restart apache