简体   繁体   English

如何在 Ubuntu 18.04 上仅使用 PHP7.3 安装 phpMyAdmin?

[英]How to install phpMyAdmin only with PHP7.3 on Ubuntu 18.04?

I have an Ubuntu 18.04 server with Apache, PHP7.3, and MariaDB.我有一个 Ubuntu 18.04 服务器,带有 Apache、PHP7.3 和 MariaDB。 Now I need to install phpmyadmin and I tried to do that using the code below:现在我需要安装 phpmyadmin 并且我尝试使用下面的代码来做到这一点:

apt install phpmyadmin

But this command will install and replace the PHP7.4 with PHP7.3, whereas I need to keep using PHP7.3.但是这个命令会安装 PHP7.4 并将其替换为 PHP7.3,而我需要继续使用 PHP7.3。

How can I do this?我怎样才能做到这一点?

How have you installed PHP 7.4, since Ubuntu Bionic (18.04) includes PHP 7.2 ( https://packages.ubuntu.com/bionic/php )? How have you installed PHP 7.4, since Ubuntu Bionic (18.04) includes PHP 7.2 ( https://packages.ubuntu.com/bionic/php )?

You seem to have gone outside of the standard packages (perhaps you're using the excellent effots provided by Ondřej Surý at https://deb.sury.org/ ).您似乎已经超出了标准软件包(也许您正在使用 Ondřej Surý 在https://deb.sury.org/提供的出色工作)。 In this case, it's going to cause you some amount of grief to mix and match the newer PHP with the distribution's phpMyAdmin, because of these dependency problems.在这种情况下,由于这些依赖性问题,将较新的 PHP 与发行版的 phpMyAdmin 混合和匹配会让您感到非常痛苦。

You could force the matter.你可以强求。 This is probably going to cause you problems, since Bionic packages phpMyAdmin 4.6.6, which is only supported up to PHP 7.1.这可能会给您带来问题,因为 Bionic 软件包 phpMyAdmin 4.6.6,仅支持 PHP 7.1。 https://serverfault.com/questions/250224/how-do-i-get-apt-get-to-ignore-some-dependencies has some instructions on ignoring the dependencies. https://serverfault.com/questions/250224/how-do-i-get-apt-get-to-ignore-some-dependencies有一些关于忽略依赖项的说明。 I recommend avoiding this solution.我建议避免使用此解决方案。

You could install your own phpMyAdmin.您可以安装自己的 phpMyAdmin。 Download the source from phpmyadmin.net and uncompress it to your web root.从 phpmyadmin.net 下载源代码并将其解压缩到 web 根目录。 You may need to add a short configuration file, config.inc.php , but mostly it just works with the default settings.您可能需要添加一个简短的配置文件config.inc.php ,但大多数情况下它只适用于默认设置。 https://docs.phpmyadmin.net/en/latest/setup.html has a quick start section. https://docs.phpmyadmin.net/en/latest/setup.html有一个快速入门部分。

You could downgrade your PHP, but you've already stated this isn't a good option for you, and I'm not sure how the Ubuntu package managers get phpMyAdmin working with this newer PHP version. You could downgrade your PHP, but you've already stated this isn't a good option for you, and I'm not sure how the Ubuntu package managers get phpMyAdmin working with this newer PHP version.

Clearly, I think the best solution for you to is to install your own phpMyAdmin.显然,我认为您最好的解决方案是安装您自己的 phpMyAdmin。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM