PHP packages installation take a really long time

When I install a PHP package it takes a really long time. I installed php81 and some dependencies like those :
php81-bcmath
php81-calendar
php81-cli
php81-curl
php81-dom
php81-exif
php81-fileinfo
php81-ftp
php81-gd
php81-gettext
php81-iconv
php81-imagick
php81-imap
php81-intl
php81-mbstring
php81-mysql
php81-openssl
php81-pdo
php81-phar
php81-redis

To reproduce:
yay -S php81 php81-cli php81-fpm

The installation of all the PHP packages takes a really long time on my machine. Is this a normal behavior ?

you are installing the packages from the AUR.

If you want the repo version, use pacman instead of yay.

If you need that specific version from the AUR, read this https://wiki.archlinux.org/title/Arch_User_Repository
Especially the get started section.

So I should do pacman -S php81 ...? Why is there a difference between pacman and yay? I thought yay was a synonym/wrapper for pacman and added some commands.

On top of installing “pacman-packages”, yay will also install packages from the AUR, which pacman can’t do. :wink:

php81 is only available as AUR-pkg. See:
https://wiki.archlinux.org/title/PHP

No.

Here is the thing. Arch doesn’t provide those php81 packages.

However, there are community contributed scripts in the AUR that provide php81.

However, what is in AUR is not compiled packages. It is instructions/scripts for building the packages.

What yay or other AUR helpers do is read those instructions and then build the packages on your machine and then install them.

The reason it is taking a long time is because it is actually compiling all that software on your machine, building packages and then installing the packages.

In the repos, there is a package called php-legacy. This is currently 8.1 so if you install the php legacy series you will get php 8.1 and it will be much faster to install.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.