I followed this link to install LAMP server on my Ubuntu 16.04 OS. In the steps given, I have skipped the installation of MariaDB (I went with mysql instead). Also, there was an error while installing libapache2-mod-php7. The error that I got during installation is

Unable to locate package libapache2-mod-php7

Other than this everything went as per the script. Now when I try to open the phpmyadmin page from my browser using


I gets a page full of codes instead of a GUI window that asks for login credentials. There are no errors in opening the page etc. It just displays the codes on the browser window.

Where am I missing out on?

Screen shot of the error received: - error


You need libapache2-mod-php7.0 for Apache to interpret PHP. This package is crucial for proper processing of the source code. Try again to install it. I've just checked and it is present in the repository. Do this

sudo apt install libapache2-mod-php7.0

(The correct package name is: "libapache2-mod-php7.0" not "...-php7".)

Then restart Apache.

service apache2 restart

Then check the login page.

  • I just did that. It shows the same error. I am using proxy server of my institute to access web. Could that be an issue? I am putting the screen shot of the error in my question – Upendra01 Aug 7 '16 at 12:19
  • Maybe. But not likely. Try it again after first doing sudo apt update. – user147505 Aug 7 '16 at 12:28
  • Then just check with apt search libapache2-mod-php7. – user147505 Aug 7 '16 at 12:29
  • I executed the command apt search libapache2-mod-php7. It seemed to run successfully. I am posting the screen shot – Upendra01 Aug 7 '16 at 12:37
  • Ok, now it's all clear. The command was wrong. The package name is not ...-php7, but ...-php-7.0. – user147505 Aug 7 '16 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.