PHP8 -- Oops, incompatible
2021-01-31
Minor fuckup: Nextcloud 18 is not PHP8 compatible.
This version of Nextcloud is not compatible with > PHP 7.4. You are currently running 8.0.1.
Resolution in a few steps:
- Query for all currently installed php packages:
pacman -Qqs php - Find and replace
phpwithphp7in output:sed -r "s/php/php7/" - Use resulting package list as installation argument:
pacman -S - - Glue it all together:
~ # pacman -Qqs php | sed -r "s/php/php7/" | pacman -S - resolving dependencies... looking for conflicting packages... Package (5) New Version Net Change Download Size extra/php7 7.4.14-1 23.11 MiB 3.70 MiB extra/php7-fpm 7.4.14-1 16.07 MiB 2.55 MiB extra/php7-gd 7.4.14-1 0.10 MiB 0.03 MiB community/php7-imagick 3.4.4.r66.g448c1cd-2 0.46 MiB 0.11 MiB extra/php7-intl 7.4.14-1 0.44 MiB 0.13 MiB Total Download Size: 6.53 MiB Total Installed Size: 40.18 MiB :: Proceed with installation? [Y/n] - Deinstall original php packages (which are now php8):
pacman -Qqs php | grep -v php7 | pacman -R - - Add symlinks from
phptophp7binaries and modulesln -s /usr/bin/php7 /usr/bin/php ln -s /usr/bin/php-config{7,} ln -s /usr/bin/php-fpm{7,} ln -s /usr/bin/phpize{7,} ln -s /usr/lib/systemd/system/php-fpm{7,}.service mv /etc/php7{,.original} mv /etc/php{,7} ln -s /etc/php7 /etc/php ln -s /usr/lib/php{7,} - Get php configs from
.pacsavefiles:cp /etc/php7/php.ini{.pacsave,} cp /etc/php7/php-fpm.d/www.conf{.pacsave,} cp /etc/php7/conf.d/imagick.ini{.pacsave,} - Get php-fpm.conf from backup and place it into
/etc/php7(fingers crossed you have a backup ;-) ) - Restart
php-fpm.service