简体   繁体   English

LinuxMint debbie 安装 PHP7.4

[英]LinuxMint debbie install PHP7.4

i'm using LinuxMint with this information:我正在使用带有以下信息的LinuxMint

hi@hiy:~$ uname -a -r
Linux hi 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux

hi@hi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    LMDE 4 (debbie)
Release:    4
Codename:   debbie

i think this release of LinuxMint based on Debian and this following codes doesn't add php7.4 to repository:我认为这个版本的LinuxMint基于Debian并且以下代码不会将php7.4添加到存储库:

sudo apt install -y apt-transport-https lsb-release ca-certificates wget
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt update

install PHP7.4安装PHP7.4

sudo apt install php7.4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php7.4
E: Couldn't find any package by glob 'php7.4'
E: Couldn't find any package by regex 'php7.4'

Add the ondrej/php which has PHP 7.4 package and other required PHP extensions.添加具有 PHP 7.4 package 和其他所需 PHP 扩展的 ondrej/php。
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Once you have added the PPA you can install PHP 7.4.添加 PPA 后,您可以安装 PHP 7.4。

Execute the following command to install PHP 7.4执行以下命令安装 PHP 7.4

sudo apt install php7.4

Maybe a bit late, but the solution is rather simple, if you think about it.也许有点晚了,但如果你仔细想想,解决方案相当简单。
And hopefully this will help others, that come across the same problem.希望这能帮助遇到同样问题的其他人。

LMDE 4 (debbie) is a niche product and doesn't have a PHP package specifically defined for it. LMDE 4 (debbie) 是一种利基产品,没有专门为它定义的 PHP package。
But since it uses Debian 10 Buster as underlying foundation, you can simply use the Buster package.但由于它使用 Debian 10 Buster 作为底层基础,您可以简单地使用 Buster package。

Solution: Exchange ($lsb_release -sc) with buster and it will work.解决方案:buster交换($lsb_release -sc)

This is also necessary for some other packages, like Docker.这对于其他一些包也是必需的,例如 Docker。

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

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