0

I am installing php/apache on a fresh installed Ubuntu 20.04:

apt install apache2 php7.4 php7.4-mysql php7.4-json php7.4-apcu php7.4-memcached php7.4-imap php7.4-mbstring

Then I noticed these messages:

Note, selecting 'php-apcu' instead of 'php7.4-apcu'
Note, selecting 'php-memcached' instead of 'php7.4-memcached'

php packages installed:

apt list --installed | grep php
libapache2-mod-php7.4/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed,automatic]
php-apcu/focal,focal,now 5.1.18+4.0.11-1build1 amd64 [installed]
php-common/focal,focal,focal,focal,now 2:75 all [installed,automatic]
php-igbinary/focal,focal,now 3.1.2+2.0.8-1build1 amd64 [installed,automatic]
php-memcached/focal,focal,now 3.1.4+2.2.0-1 amd64 [installed]
php-msgpack/focal,focal,now 2.1.0beta1-0ubuntu2 amd64 [installed,automatic]
php7.4-cli/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed]
php7.4-common/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed,automatic]
php7.4-imap/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed]
php7.4-json/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed]
php7.4-mbstring/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed]
php7.4-mysql/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed]
php7.4-opcache/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed,automatic]
php7.4-readline/focal-updates,focal-security,focal-updates,focal-security,now 7.4.3-4ubuntu2.2 amd64 [installed,automatic]
php7.4/focal-updates,focal-updates,focal-security,focal-security,focal-updates,focal-updates,focal-security,focal-security,now 7.4.3-4ubuntu2.2 all [installed]

As I understand it: When new versions of php arrive, I have no control if php packages are installed without version. If I want to decide for myself (via alternatives) when to use a new version of php, I have to include version number in the package name, when I install them.

Therefore I am wondering why there is no php7.4-memcached package.

But looking at the versions in apt list I then noticed that the four packages not named php7.4-* have a different version in the info e.g.:

php-memcached/focal,focal,now 3.1.4+2.2.0-1 amd64 [installed]

Is it correct to assume that these four php packages is NOT following php versioning, but something else, for example php-memcached is following memcached instead? Or is there another explanation?

0

That's normal - the php packages refer behind the scenes to the version-specific packages and you should be installing the unversioned PHP packages anyways. Those aren't likely to change from the PHP version on the system, especially since it's an LTS release you're using. There's no chance a 'new' PHP version will land in Focal right now.

This is Expected Behavior. Trust me though that it will install memcached from PHP 7.4 (or a 7.4-compatible memcached anyways). Not all PHP packages originate from the PHP source code and some are compiled separately (and have separate source packages) so they have to use the unversioned php package name syntax for installing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.