localhost/phpmyadmin not working on ubuntu 16.04
You have two options
Enter these commands for the specific error if your prior configuration is okay:
sudo apt-get update
sudo apt-get install php-gettext php-mbstring
sudo service apache2 restart
Or remove and start a fresh install:
sudo service mysql stop
sudo apt-get --purge remove mysql*
sudo apt-get --purge remove phpmyadmin
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get update
sudo apt-get install mysql-server phpmyadmin php-gettext php-mbstring
sudo service apache2 restart
Check that when you configure phpmyadmin's http server setting that you select the server by pressing the spacebar and is it gets marked with an asterisk or it will not configure it. The press "OK" to save it.
install libapache2-mod-php and worked for me