2

After upgrading php5 to php7, I get this error when I want to apt-get install phpmyadmin

The following packages have unmet dependencies:
 phpmyadmin : Depends: libapache2-mod-php5 but it is not going to be installed or
                       libapache2-mod-php5filter but it is not going to be installed or
                       php5-cgi but it is not going to be installed or
                       php5-fpm but it is not going to be installed or
                       php5 but it is not going to be installed
              Depends: php5-mysql but it is not going to be installed or
                       php5-mysqli but it is not installable or
                       php5-mysqlnd but it is not going to be installed
              Depends: php5-mcrypt but it is not going to be installed
              Depends: php5-json but it is not going to be installed
              Depends: php-gettext but it is not going to be installed
              Recommends: php5-gd but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

It's indicating that phpMyAdmin requires php5, but the dependencies can't be installed because php7 is already installed.

Is there a way to install phpMyAdmin and php7 at the same time?

I'm using these additional sources

deb http://packages.dotdeb.org jessie all
deb-src http://packages.dotdeb.org jessie all

Using Debian Jessie.

2
  • do you found any solution? I'm running into the same problem. I'm considering to switch to ubuntu for this server, but I would rather solve the problem
    – simon
    Dec 5, 2015 at 10:06
  • Like in the answer below explained: This would be just fiddling with different versions / building phpMyAdmin yourself, etc. I will wait until php7 becomes widely available.
    – bytecode77
    Dec 5, 2015 at 12:36

2 Answers 2

4

Using php7 and any OS packages will be difficult until distros (or third party repos) are updated to handle this and you really shouldn't do this on a production system.

My advice is to not attempt this and wait until a PHP7 infrastructure is in place. You could work around by installing most things like PHPMyAdmin by hand, but this is not good system management practice.

1
  • 1
    Any idea when php-7 will be widely available via apt-get?
    – bytecode77
    Dec 29, 2015 at 18:37
1

I was able to get this to work on my VPN by running this command in my web root folder (/var/www/html).

git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git

This probably isn't best practice, but will work.

2
  • fixed all the issues I was having on mac (MAMP) and linux for me
    – zanedev
    Apr 9, 2017 at 20:26
  • might be worth adding that you also need to run "composer install" in the phpmyadmin directory after pulling
    – zanedev
    Apr 9, 2017 at 20:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .