skip to Main Content

i’m using LinuxMint with this information:

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:

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

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'

2

Answers


  1. Add the ondrej/php which has PHP 7.4 package and other required PHP extensions.
    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.

    Execute the following command to install PHP 7.4

    sudo apt install php7.4

    Login or Signup to reply.
  2. 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.
    But since it uses Debian 10 Buster as underlying foundation, you can simply use the Buster package.

    Solution: Exchange ($lsb_release -sc) with buster and it will work.

    This is also necessary for some other packages, like Docker.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search