I have installed remi repository but I was unable to install php. So, instead I have installed php via stream with the following command which seems that uses remi repo.

dnf module install php:8.1

Now, I am trying to install php-oci8 in oracle linux 9 via remi repository but without success. It seems that php-oci8 is available in remi repo: http://rpms.remirepo.net/enterprise/9/php81/x86_64/repoview/php-oci8.html

I have tried this :

dnf config-manager --enable remi-modular

yum install php-oci8

And I am getting the following error:

All matches were filtered out by modular filtering for argument: php-oci8

Error: Unable to find a match: php-oci8

I do not understand what is wrong. Also, I have tried raven and EPEL repos but I am getting the same error message. Is there a way to install php-oci8 with dnf module ? Or is there any way to "persuade" dnf to install php-oci8 with remi repo?

2 Answers 2


You are not using the proper stream, php:8.1 is the official one, with minimal set of extensions, in your case you need to use the php:remi-8.1 alternative stream.

# dnf install php-oci8
Dependencies resolved.
 Package                   Architecture            Version                            Repository                     Size
 php-oci8                  x86_64                  8.1.13-1.el9.remi                  remi-modular                  134 k
Installing dependencies:
 php-pdo                   x86_64                  8.1.13-1.el9.remi                  remi-modular                  113 k

Transaction Summary
Install  2 Packages

Total download size: 248 k
Installed size: 941 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-oci8-8.1.13-1.el9.remi.x86_64.rpm                                              2.6 MB/s | 134 kB     00:00    
(2/2): php-pdo-8.1.13-1.el9.remi.x86_64.rpm                                               1.2 MB/s | 113 kB     00:00    
Total                                                                                     2.5 MB/s | 248 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                  1/1 
  Installing       : php-pdo-8.1.13-1.el9.remi.x86_64                                                                 1/2 
  Installing       : php-oci8-8.1.13-1.el9.remi.x86_64                                                                2/2 
  Running scriptlet: php-oci8-8.1.13-1.el9.remi.x86_64                                                                2/2 
  Verifying        : php-oci8-8.1.13-1.el9.remi.x86_64                                                                1/2 
  Verifying        : php-pdo-8.1.13-1.el9.remi.x86_64                                                                 2/2 
Installed products updated.

  php-oci8-8.1.13-1.el9.remi.x86_64                            php-pdo-8.1.13-1.el9.remi.x86_64                           


# php --ri oci8


OCI8 Support => enabled
OCI8 DTrace Support => enabled
OCI8 Version => 3.1.0
Oracle Run-time Client Library Version =>
Oracle Compile-time Instant Client Version => 21.7

For a proper repository configuration and usage, please follow the Wizard instructions

And for oracle, I also recommend you read Installation of Oracle extensions for PHP


It a mixed packages from different sources problem: Using dnf module install php:8.1 should install php from Oracle repo, using 8.1 stream (I can't tell how it got installed from Remi).

I'll send you how I installed php-oci8 recently but on Oracle Linux 8, php 8.0. In theory, there isn't anything preventing the same steps on OL9 + php8.1.

First step, remove Remi repo. I proceeded using Oracle repo + PHP pecl (pecl adds PHP extensions).
Delete any Remi file from /etc/yum.repos.d/ or rename extension, or enable=0, whatever method you prefer for removing/disabling a repo. Then run:

dnf check-upgrade

This step is needed to remove any php packages for other sources. Keep track of the php packages you had installed; you'll install them back again but this time from Oracle repo, 8.1 stream. Plus any conf files.
dnf list *php*
Write down the installed php and php related packages.
dnf remove {any php - php related packages}

dnf module reset php

Enable php 8.1 stream, whatever php package will be on 8.1 version
dnf module enable php:8.1

You'll need to install php-pear for pecl installation, php-devel is needed also, plus all other php packages you had installed before removal
dnf install php php-pear php-devel {plus the rest php packages}

You will be asked for ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client.
sudo pecl install oci8

Now OCI is installed, check with
pecl list

Add OCI extension to php.ini
echo extension=oci8.so >> /etc/php.ini

systemctl restart php-fpm.service

OCI 8 should appear here
php -m |grep -i oci

After the last step you are good to go!

  • using the pecl command means building from sources, and thus having all development tools installed, which is often considered a bad practice on production env. Dec 21, 2022 at 9:38
  • @RemiCollet indeed, that's why php-devel is needed. On the other hand, using repos like Remi or EPEL or any other non-vendor is also considered a bad practice for production.
    – Krackout
    Dec 21, 2022 at 10:09
  • but the original question was "via remi" repository ;) Dec 22, 2022 at 7:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .