remicollet / remirepo

Issue tracker for
https://rpms.remirepo.net/
278 stars 53 forks source link

Installation of php82-php-oci8-8.2.22-1.el9.remi.x86_64 fails, cannot find Oracle client library #261

Closed workcd closed 3 months ago

workcd commented 3 months ago

Hi,

Trying to install php82-php-oci8 package but it gives the following error:

Error: Problem: cannot install the best candidate for the job

Oracle Instant client 23 installed using Oracle instant client zips, cannot use rpm installer as that is for Oracle Linux only as far I know and we are using RedHat 9. Have set ORACLE_HOME and LD_LIBRARY_PATH but dnf/yum is not finding Oracle instant client library object when it tried to install phpj82-php-oci8 package.

Thanks Colin

cjbj commented 3 months ago

You can use Instant Client RPMs on RH.

But if you use the ZIPs, instead of setting LD_LIBRARY_PATH, use ldconfig as shown in the Instant Client install doc:

sudo sh -c "echo /opt/oracle/instantclient_23_4 > \
      /etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig

Also, never set ORACLE_HOME with Instant Client, because on machines with multiple Oracle bundles installed, it can lead to clashes and errors like ORA-1804.

SieGeL2k16 commented 3 months ago

FYI: Just had the same problem on my Rocky Linux 9 box. Solved it like this:

Download the OL9 RPM's from https://www.oracle.com/de/database/technologies/instant-client/linux-x86-64-downloads.html (I'm using the Basic, SQL*Plus and Tools RPMs)

Next install them with dnf:

dnf install *.rpm

this will also pull the latest PHP 8.2.22 OCI* packages if you have already PHP 8.2.21 installed

That's it. Maybe that helps.

remicollet commented 3 months ago

The switch from 21.1 to 23.1 was tracked in #255