Topic: php-oci8-8.2.10 upgrade to php-oci8-8.2.18 fails

Hi,

Oracle Linux 9. Trying to update Remi repo PHP from 8.2.10-1.el9.remi to 8.2.19-1.el9.remi, but oci8 fails with error message "nothing provides libclntsh.so.21.1()(64bit) needed by php-oci8-8.2.19-1.el9.remi.x86_64 from remi-modular"

# php --ri oci8

oci8

OCI8 Support => enabled
OCI8 DTrace Support => enabled
OCI8 Version => 3.3.0
Oracle Run-time Client Library Version => 23.4.0.24.5
Oracle Compile-time Instant Client Version => 21.10

Directive => Local Value => Master Value
oci8.max_persistent => -1 => -1
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
oci8.default_prefetch => 100 => 100
oci8.old_oci_close_semantics => Off => Off
oci8.connection_class => no value => no value
oci8.events => Off => Off
oci8.prefetch_lob_size => 0 => 0

Statistics =>  
Active Persistent Connections => 0
Active Connections => 0

From

yum info php-oci8

I get that:

Installed Packages
Name         : php-oci8
Version      : 8.2.10
Release      : 1.el9.remi
Architecture : x86_64
Size         : 479 k
Source       : php-8.2.10-1.el9.remi.src.rpm
Repository   : @System
From repo    : remi-modular
Summary      : A module for PHP applications that use OCI8 databases
License      : PHP-3.01
Description  : The php-oci8 packages provides the OCI8 extension version 3.3.0
             : and the PDO driver to access Oracle Database.
             : 
             : The extension is linked with Oracle client libraries 21.10

And

Available Packages
Name         : php-oci8
Version      : 8.2.19
Release      : 1.el9.remi
Architecture : x86_64
Size         : 137 k
Source       : php-8.2.19-1.el9.remi.src.rpm
Repository   : remi-modular
Summary      : A module for PHP applications that use OCI8 databases
License      : PHP-3.01
Description  : The php-oci8 packages provides the OCI8 extension version 3.3.0
             : and the PDO driver to access Oracle Database.
             : 
             : The extension is linked with Oracle client libraries 21.13

I assume 21.10 is OK even though 8.2.19 requires libraries 21.13? $LD_LIBRARY_PATH has correct path to oracle client. When I remove the path to Oracle instant client service php-fpm fails, so I assume path is described correctly.
I have Oracle XE 21c database installed and it has an instant client version:

ldd /opt/oracle/product/21c/dbhomeXE/lib/libclntsh.so
    linux-vdso.so.1 (0x00007ffdb76f6000)
    libnnz21.so => /opt/oracle/product/21c/dbhomeXE/lib/libnnz21.so (0x00007f0471d7e000)
    libdl.so.2 => /usr/lib64/libdl.so.2 (0x00007f0471d79000)
    libm.so.6 => /usr/lib64/libm.so.6 (0x00007f0471c9e000)
    libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x00007f0471c99000)
    librt.so.1 => /usr/lib64/librt.so.1 (0x00007f0471c94000)
    libaio.so.1 => /usr/lib64/libaio.so.1 (0x00007f0471c8d000)
    libresolv.so.2 => /usr/lib64/libresolv.so.2 (0x00007f0471c79000)
    libc.so.6 => /usr/lib64/libc.so.6 (0x00007f0471a70000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f04768cc000)
    libclntshcore.so.21.1 => /opt/oracle/product/21c/dbhomeXE/lib/libclntshcore.so.21.1 (0x00007f04714c1000)

Where is the issue? Why upgrade fails? For php-oci8-8.2.10 is libclntsh.so.21.1 is OK, but not for php-oci8-8.2.19? Can it be this https://php-forum.com/index.php?threads … -24.30365/? Currently I am stuck to php-oci8-8.2.10 version because of oci8, but I need that smile

Re: php-oci8-8.2.10 upgrade to php-oci8-8.2.18 fails

You need to install Oracle Instant Client RPM from
https://www.oracle.com/database/technol … loads.html

Using the RPM is the only safe way to resolve such dependencies
especially when it will be soon updated to use version 23

See
https://github.com/remicollet/remirepo/issues/167
https://github.com/remicollet/remirepo/issues/255

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

3 (edited by Le_Inc 2024-05-15 13:22:34)

Re: php-oci8-8.2.10 upgrade to php-oci8-8.2.18 fails

I cannot install OL9 rpm because it conflicts existing Oracle XE 21c:

# yum localinstall oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64.rpm 
Last metadata expiration check: 0:02:30 ago on K 15 mai   2024 16:10:57.
Error: 
 Problem: package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with genezi <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with libclntsh.so <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with libclntshcore.so <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with libocci.so <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with libocijdbc <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with ojdbc8.jar <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with ucp.jar <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with xstreams.jar <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with oracle-database-xe-21c provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with libclntsh.so.21.1 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with oracle-database-xe provided by oracle-database-xe-21c-1.0-1.x86_64 from @System
  - conflicting requests
  - problem with installed package oracle-database-xe-21c-1.0-1.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Any ideas how to remedy that? Client first and then XE 21c? Can it work? Probably XE 21c overwrites files or causes another conflict?

Re: php-oci8-8.2.10 upgrade to php-oci8-8.2.18 fails

Notice: for now you need version 21.13 (see my previous links)

>Problem: package oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64 from @commandline conflicts with genezi <= 23.4 provided by oracle-database-xe-21c-1.0-1.x86_64 from @System

Sorry you need to ask Oracle about this
(they are terribly bad at packaging)

I think the best way is to not install everything on the same server

- 1 server for the Database
- 1 server for PHP application

Or use VM or Container

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

5 (edited by Le_Inc 2024-05-17 07:41:42)

Re: php-oci8-8.2.10 upgrade to php-oci8-8.2.18 fails

Thank you for the input. I will probably create a new VM for web services .. but I have no luck with it: smile

Installed fresh Oracle Linux 9.4, did localinstall Version 23.4.0.0.0 and oracle-instantclient-basic-23.4.0.24.05-1.el9.x86_64.rpm, but getting still error "- nothing provides libclntsh.so.21.1()(64bit) needed by php-oci8-8.3.7-1.el9.remi.x86_64 from remi-modular".

# rpm -q --provides oracle-instantclient-basic
config(oracle-instantclient-basic) = 23.4.0.24.05-1.el9
genezi = 23.4
libclntsh.so = 23.4
libclntsh.so.23.1
libclntsh.so.23.1()(64bit)
libclntshcore.so = 23.4
libclntshcore.so.23.1()(64bit)
libnnz.so()(64bit)
libocci.so = 23.4
libocci.so.23.1()(64bit)
libociei.so()(64bit)
libocijdbc = 23.4
libocijdbc23.so()(64bit)
ojdbc8.jar = 23.4
oracle-instantclient-basic = 23.4.0.24.05-1.el9
oracle-instantclient-basic(x86-64) = 23.4.0.24.05-1.el9
ucp.jar = 23.4
xstreams.jar = 23.4

Does it has to be 21.13 version? I'd assume 23.4 would be OK because it contains lower version?

Well it actually need exact version, did

 dnf install oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm 

and installation succeeds!