Couple of problems installing Rocky 8 - can you help?

I’m installing Rocky 8 on a new server build and have always followed (with some mods) the howtoforge Perfect Server documents - for many years!
I used the Centos 8 guide as a starter but there are several php packages that are not found in the rocky 8 repositories (and epel, remi as well).

They are: php-imap php-mysql php-pecl-apc php-mcrypt php-tidy php-imagick php-pspell
I’ve created php-imagick from the instructions i located, and I suspct php-mysqlnd is a replacement for php-mysql.
but any ideas on the others? either the rocky equiv/replacements. or not needed at all?

thanks.

Use php-opcache, instead of php-apc, that’s just old now.

php-mcrypt might already be by default with php without separate package, use php -m command when php-cli is installed to check what modules are actually there. That might also show that imap is also installed.

Old articles/howtos will always have the wrong package names when they aren’t updated regularly.

1 Like

alas, php -m shows neither mcrypt nor imap. so where are they?
the message from dnf is All matches were filtered out by modular filtering for argument: php-imap
my repos are:
[root@ns1 ~]# dnf repolist
repo id repo name
appstream Rocky Linux 8 - AppStream
baseos Rocky Linux 8 - BaseOS
epel Extra Packages for Enterprise Linux 8 - x86_64
extras Rocky Linux 8 - Extras
powertools Rocky Linux 8 - PowerTools
remi-modular Remi’s Modular repository for Enterprise Linux 8 - x86_64
remi-safe Safe Remi’s RPM repository for Enterprise Linux 8 - x86_64

I see you have remi installed, although you don’t mention which version of PHP you are installing or what version of PHP you are wanting to use, but anyway, IMAP is there, see how I searched:

[root@rocky8 ~]# dnf list *php* | grep -i imap
php56-php-imap.x86_64                      5.6.40-36.el8.remi                               remi-safe
php70-php-imap.x86_64                      7.0.33-37.el8.remi                               remi-safe
php71-php-imap.x86_64                      7.1.33-24.el8.remi                               remi-safe
php72-php-imap.x86_64                      7.2.34-16.el8.remi                               remi-safe
php73-php-imap.x86_64                      7.3.33-8.el8.remi                                remi-safe
php74-php-imap.x86_64                      7.4.33-6.el8.remi                                remi-safe
php80-php-imap.x86_64                      8.0.28-4.el8.remi                                remi-safe
php81-php-imap.x86_64                      8.1.19-1.el8.remi                                remi-safe
php82-php-imap.x86_64                      8.2.6-1.el8.remi                                 remi-safe

even if you do a search for just php-imap like so:

[root@rocky8 ~]# dnf search php-imap
Last metadata expiration check: 0:00:57 ago on Sun 28 May 2023 08:29:45 PM CEST.
========================================== Name Matched: php-imap ===========================================
php56-php-imap.x86_64 : A module for PHP applications that use IMAP
php70-php-imap.x86_64 : A module for PHP applications that use IMAP
php71-php-imap.x86_64 : A module for PHP applications that use IMAP
php72-php-imap.x86_64 : A module for PHP applications that use IMAP
php73-php-imap.x86_64 : A module for PHP applications that use IMAP
php74-php-imap.x86_64 : A module for PHP applications that use IMAP
php80-php-imap.x86_64 : A module for PHP applications that use IMAP
php81-php-imap.x86_64 : A module for PHP applications that use IMAP
php82-php-imap.x86_64 : A module for PHP applications that use IMAP

it shows that you have to specify the version you are installing. I would check what PHP packages you have actually attempted to install, since you could be using the default PHP from what RHEL and Rocky has by default, which doesn’t have the imap module.

As for mcrypt:

[root@rocky8 ~]# dnf search mcrypt
Last metadata expiration check: 0:05:02 ago on Sun 28 May 2023 08:29:45 PM CEST.
====================================== Name & Summary Matched: mcrypt =======================================
libmcrypt-devel.x86_64 : Development libraries and headers for libmcrypt
libtomcrypt-devel.x86_64 : Development files for libtomcrypt
php56-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php70-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php71-php-mcrypt.x86_64 : Standard PHP module provides mcrypt library support
php72-php-pecl-mcrypt.x86_64 : Bindings for the libmcrypt library
php73-php-pecl-mcrypt.x86_64 : Bindings for the libmcrypt library
php74-php-pecl-mcrypt.x86_64 : Bindings for the libmcrypt library
php80-php-pecl-mcrypt.x86_64 : Bindings for the libmcrypt library
php81-php-pecl-mcrypt.x86_64 : Bindings for the libmcrypt library
php82-php-pecl-mcrypt.x86_64 : Bindings for the libmcrypt library
=========================================== Name Matched: mcrypt ============================================
libmcrypt.x86_64 : Encryption algorithms library
libtomcrypt.x86_64 : A comprehensive, portable cryptographic toolkit

so there you go, it’s installable from Remi. You just needed to vary your search method.

i’m using php7.4
and I do
dnf install php74-php-pecl-mcrypt.x86_64 installs ok
and dnf install php74-php-imap.x86_64 installs ok
but php -m does not show imap or mcrypt. should it not?

Sounds like to me you have PHP7.4 Rocky packages installed, and not PHP 7.4 from Remi. Please check what packages you have installed and from where.

dnf list installed *php*

post the list f them here if you are unsure. If you installed PHP 7.4 from Remi, then all php packages installed on your system will start with php74.

Also check:

dnf module list php

and post the results here.

php.x86_64                                                                       7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-cli.x86_64                                                                   7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstreamphp-common.x86_64                                                                7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-devel.x86_64                                                                 7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-fpm.x86_64                                                                   7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-gd.x86_64                                                                    7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-intl.x86_64                                                                  7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-json.x86_64                                                                  7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-ldap.x86_64                                                                  7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-mbstring.x86_64                                                              7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-mysqlnd.x86_64                                                               7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-odbc.x86_64                                                                  7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-opcache.x86_64                                                               7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-pdo.x86_64                                                                   7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-pear.noarch                                                                  1:1.10.13-1.module+el8.7.0+1067+0a7071cc                                                     @appstream
php-pecl-zip.x86_64                                                              1.18.2-1.module+el8.6.0+789+2130c178                                                         @appstream
php-process.x86_64                                                               7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-snmp.x86_64                                                                  7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-soap.x86_64                                                                  7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-xml.x86_64                                                                   7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php-xmlrpc.x86_64                                                                7.4.33-1.module+el8.8.0+1150+ac720675                                                        @appstream
php74-php-common.x86_64                                                          7.4.33-6.el8.remi                                                                            @remi-safe
php74-php-imap.x86_64                                                            7.4.33-6.el8.remi                                                                            @remi-safe
php74-php-json.x86_64                                                            7.4.33-6.el8.remi                                                                            @remi-safe
php74-php-pecl-mcrypt.x86_64                                                     1.0.6-1.el8.remi                                                                             @remi-safe
php74-runtime.x86_64                                                             7.4-3.el8.remi    

AND

 dnf module list php
Last metadata expiration check: 1:51:35 ago on Sun 28 May 2023 02:35:50 PM EDT.
Rocky Linux 8 - AppStream
Name                                Stream                                 Profiles                                                 Summary                                             
php                                 7.2 [d]                                common [d], devel, minimal                               PHP scripting language                              
php                                 7.3                                    common [d], devel, minimal                               PHP scripting language                              
php                                 7.4 [e]                                common [d], devel, minimal                               PHP scripting language                              
php                                 8.0                                    common [d], devel, minimal                               PHP scripting language                              

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                                Stream                                 Profiles                                                 Summary                                             
php                                 remi-7.2                               common [d], devel, minimal                               PHP scripting language                              
php                                 remi-7.3                               common [d], devel, minimal                               PHP scripting language                              
php                                 remi-7.4                               common [d], devel, minimal                               PHP scripting language                              
php                                 remi-8.0                               common [d], devel, minimal                               PHP scripting language                              
php                                 remi-8.1                               common [d], devel, minimal                               PHP scripting language                              
php                                 remi-8.2                               common [d], devel, minimal                               PHP scripting language                              


So this is why it doesn’t work. You have a mix of PHP packages. You have installed the php-* from Rocky repositories which doesn’t have the modules you need. You need to remove them, and install the php74-* packages from Remi’s repo.

Better would be to also do:

dnf module reset php
dnf module enable php:remi-7.4

that way instead of doing dnf install php74-*, you can use it with dnf install php-*` as then the php-``` packages will be symlinked to the Remi ones. That will most likely need to to remove all php packages currently installed but at least you will have a clean and clear system with the correct version of PHP and not a mix of packages.