PHP 8.1 Linux Mint 19 Installation – Step-by-step

October 17, 2021 | By the+gnu+linux+evangelist.

Installing PHP

  1. 2. Enabling PPA Repo

    Add PHP PPA for Mint GNU/Linux

    Add PHP Repo for Mint
  2. 3. Installing PHP 8.1

    Now to Install PHP 8.1 on Mint
    Simply play:

    sudo apt install php8.1 php8.1-cli

    This Setup includes also the most useful Extensions and Tools.
    Then Test your new Php with:

    php -v
  3. 4. Searching PHP 8.1 Extensions

    Again to Search PHP 8.1 Extensions.

    So you can Search for the available PHP 8 Extensions running:

    sudo apt search php8.1

    And possibily refine the Result using a grep Pipe

    sudo apt search php8.1 | grep [KEYWORD]

    Like for instance:

    sudo apt search php8.1 | grep mysql
    Apt Php 8 Search Results

    Last, to Install multiple Packages at once you may use the following Syntax:

    sudo apt install php8.1-{curl,xml,imagick,mysql,fpm,bz2}
  4. 5. Setting PHP Version

    (Optional) In case to Manage Multiple PHP Versions on System
    Use the Default CLI Tool:

    sudo update-alternatives --config php

    If more than One then Simply Choose the Right PHP Release Entry.

    Managing

Contents


QuickChic Theme • Powered by WordPress