Package php7 4 fpm is not available, but is referred to by another package

[  focal  ] [  focal-updates  ]

Package: php7.4-fpm (7.4.3-4ubuntu2.13) [universe]

server-side, HTML-embedded scripting language (FPM-CGI binary)

  • depends
  • recommends
  • suggests
  • enhances
  • dep: libapparmor1 (>= 2.7.0~beta1+bzr1772) changehat AppArmor library
  • dep: libargon2-1 (>= 0~20171227) memory-hard hashing function - runtime library
  • dep: libc6 (>= 2.29) GNU C Library: Shared libraries
    also a virtual package provided by libc6-udeb
  • dep: libmagic1Recognize the type of data in a file using "magic" numbers - library
  • dep: libpcre2-8-0 (>= 10.32) New Perl Compatible Regular Expression Library- 8 bit runtime files
  • dep: libsodium23 (>= 1.0.14) Network communication, cryptography and signaturing library
  • dep: libssl1.1 (>= 1.1.0) Secure Sockets Layer toolkit - shared libraries
  • dep: libsystemd0systemd utility library
  • dep: libxml2 (>= 2.8.0) GNOME XML library
  • dep: mime-supportMIME files 'mime.types' & 'mailcap', and support programs
  • dep: php7.4-clicommand-line interpreter for the PHP scripting language
  • dep: php7.4-common (= 7.4.3-4ubuntu2.13) documentation, examples and common module for PHP
  • dep: php7.4-jsonJSON module for PHP
  • dep: php7.4-opcacheZend OpCache module for PHP
  • dep: systemdsystem and service manager
  • dep: tzdatatime zone and daylight-saving time data
  • dep: ucfUpdate Configuration File(s): preserve user changes to config files
  • dep: zlib1g (>= 1:1.1.4) [not armhf, i386]compression library - runtime dep: zlib1g (>= 1:1.2.3.4) [armhf, i386]
  • sug: php-pearPEAR Base System

Download php7.4-fpm

Download for all available architectures
ArchitecturePackage SizeInstalled SizeFiles
amd641,403.7 kB 4,758.0 kB [list of files]
arm641,276.9 kB 4,616.0 kB [list of files]
armhf1,179.2 kB 2,753.0 kB [list of files]
i3861,439.8 kB 4,402.0 kB [list of files]
ppc64el1,437.4 kB 5,620.0 kB [list of files]
s390x1,213.3 kB 4,636.0 kB [list of files]

  • PHP.Watch
  • Articles

Upgrade/Installation guide for PHP 7.4 on Ubuntu and Debian

PHP 7.4 was released today just in time for the thanks giving!

I have written posts about upgrading PHP to 7.3 last year, and for other versions in the previous years. It's time to upgrade to PHP 7.4!

SPOOKY WARNING

PHP 7.4 deprecates a bunch of features that your existing applications might be using. Although unlikely, there is a non-zero chance of the upgrade breaking your existing sites. Please make sure to make a proper backup of your server before you proceed.

1. Add ondrej/php PPA

Thanks to Ondrej, we have the PHP 7.4 builds ready at his PPA. These packages are not official builds from Ubuntu, but they are used by practically every modern Ubuntu stack, and I can't recommend them highly enough. If your wallet allows it, I suggest that you pay forward for his efforts with a donation.

Ubuntu
sudo add-apt-repository ppa:ondrej/php # Press enter when prompted.
sudo apt-get update
Debian
sudo apt install apt-transport-https lsb-release ca-certificates curl -y
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg 
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update

2. Get a list of current PHP packages

If you are upgrading from a previous PHP version, we will not take a note of the current PHP packages you have in your server. This list will help us to figure out the packages we should install for PHP 7.4. Note that PHP no longer bundles some less used extensions such as wddx, which you will need to compile yourself if you need it. Take a look at what's new and changing in PHP 7.4 for information on what's being removed from core.

dpkg -l | grep php | tee packages.txt

This will list all packages, filter them for those who have php in their name, and write them to packages.txt file at your current directory in addition to show them on screen.

This list will come handy to refer after we install PHP 7.4 to install the PHP 7.4 counterparts of the packages.

Package php7 4 fpm is not available, but is referred to by another package

*Breathes heavily...

PHP 7.4 core

sudo apt install php7.4 php7.4-common php7.4-cli

This is to install the basic PHP 7.4 binaries. You will have the bare minimum PHP installation after this. Note that we did not install fpm or any other server integration package just yet

PHP 7.4 extensions

It's now time for the extensions. If you are upgrading from a previous installation, you can now take a look at the contents of your packages.txt file (cat packages.txt).

In Ondrej's PPA/Debian repo, PHP packages follow the php7.4-PACKAGE pattern. For example, mbstring is at php7.4-mbstring, and curl is at php7.4-mbstring.

To install:

sudo apt install php7.4-curl php7.4-mbstring php7.4-bz2 php7.4-readline php7.4-intl

Extend the list of packages above to match to the contents of your packages.txt file, or to all packages that are desired.

Here is my recommended list of extensions:

sudo apt install php7.4-bcmath php7.4-bz2 php7.4-curl php7.4-intl php7.4-mbstring php7.4-mysql php7.4-readline php7.4-xml php7.4-zip`

PHP already includes extensions such as curl, hash, ctype in core.

Web server integration

If you are planning to use PHP in a web server, you need to integrate the web server with PHP. There are two packages that you can use:

For Nginx web server, or Apache server using mod_event MPM, you need php7.4-fpm package.
If you are using PHP as an embedded Apache module (often a bad call), you will need libapache2-mod-php7.4 package. Apache users can run apachectl -V to get more information about the server integration. If it says prefork, you need libapache2-mod-php7.4 package. php7.4-fpm otherwise.

Nginx or Apache with event MPM
sudo apt install php7.4-fpm
sudo a2enconf php7.4-fpm # For Apache only
Apache with prefork MPM
sudo apt install libapache2-mod-php7.4

3. Test PHP 7.4 installation.

Run php -v to make sure PHP 7.4 (CLI) is properly installed. You can run php -m to get a list of extensions enabled in your PHP 7.4 setup.

Package php7 4 fpm is not available, but is referred to by another package

4. Remove old PHP versions

After a successful PHP 7.4 installation, you can remove the old version if desired. Unless there is a strong reason to keep the old version running and hogging your system resources, I recommend that you remove the old versions.

apt purge php7.3 php7.3-common # Change 7.3 with all versions you want to purge.

... aaand that's it! You should now have a running PHP 7.4 with common packages/replacement packages of old version. Keep an eye on the error logs for potential backwards incompatible bugs in your code.
I have compiled a list of things changed, deprecated, added, and removed in PHP 7.4.

Recent Articles on PHP.Watch

Package php7 4 fpm is not available, but is referred to by another package

What's New in Composer 2.4

Composer 2.4 brings new `bump` and `audit` commands, shell completion support for commands and package names, automatic suggestions to install packages as `--dev` where appropriate, and several more new features and improvements.

27 Jul 2022

What is php7 4 FPM?

server-side, HTML-embedded scripting language (FPM-CGI binary) This package provides the Fast Process Manager interpreter that runs as a daemon and receives Fast/CGI requests. Note that MOST Apache users probably want the libapache2-mod-php7. 4 package.

Could not find any package php7 4?

To Solve Unable to locate package php7. 4 Error If You are trying to install php with Ondrej PPA Then it is only supports the Ubuntu 21.04, 20.10, 20.04, 18.04 You are trying with 16.04 which is too OLD so Long Term Solution is Just update your Ubuntu atleast 18.04 to 21.04.

How do I install the latest PHP version in Ubuntu?

The guide below teaches you how to install the latest PHP on Ubuntu 22.04..
Step 1: Update the system. ... .
Step 2: Install Dependencies. ... .
Step 3: Import PPA Repository of PHP. ... .
Step 4: Install Apache module/PHP-FPM. ... .
Step 5: Verify installation. ... .
Step 6: Install Extensions..

How do I download PHP on Ubuntu?

Installing PHP on Ubuntu 22.04.
Install PHP 8.1: sudo apt install php8.1..
Install PHP 7.4: sudo apt install php7.4..
Install PHP 5.6 (EOL): sudo apt install php5.6..