1

I am using Raspberry pi 2 with raspbian OS. When I try to install Mysql and phpmyadmin to raspberry using following command.

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

It shows me following error.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5-mysql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  php5-mysqlnd

Package mysql-server is a virtual package provided by:
  mysql-server-5.1 5.1.62-1 [Not candidate version]

Package libapache2-mod-auth-mysql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate
E: Package 'libapache2-mod-auth-mysql' has no installation candidate
E: Package 'php5-mysql' has no installation candidate

Many websites and articles suggest to try by updating and upgrading the packages using following command

sudo apt-get update
sudo apt-get upgrade

After executing above commands also I face the same error. Some other sites suggested to uninstall and install the package again but that also shows the same error.

Kindly help me to solve the issue.

  • Try sudo apt-cache search mysql and see what lists. Mine shows mysql-server-5.5 as well as mysql-server Maybe try the 5.5 Also the lib doesn't show but php5-mysql does – Dan V Jun 10 '16 at 3:50
1

My understanding from here is that libapache2-mod-auth-mysql is dependant on Apache 2.2 packages, whereas the current version of Raspbian runs Apache 2.4. You may wish to uninstall Apache completely, modify your sources.list and then install Apache 2.2, as suggested in this link. Basically, update /etc/apt/sources.list to replace jessie by wheezy, run sudo apt-get update and retry to reinstall. When you're done, make sure to undo your changes in /etc/apt/sources.list.

  • Sorry for late reply but I am unable to install any package using sudo apt-get command. I tried above link but it also does not clearly guide what I should do. Can you please help me. – HarshIT Jun 15 '16 at 19:20

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.