Search code examples
phpphp-gdoraclelinux

How to solve error while installing php-gd on oracle linux 7 for php 7.4


Trying to install php-gd on Oracle Linux 7 with php7.4.

sudo yum update
sudo yum install php-gd

Any of the above command generates below error:

Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package php-gd.x86_64 0:7.4.33-15.el7.remi will be installed
--> Processing Dependency: php-common(x86-64) = 7.4.33-15.el7.remi for package: php-gd-7.4.33-15.el7.remi.x86_64
--> Processing Dependency: libgd.so.103()(64bit) for package: php-gd-7.4.33-15.el7.remi.x86_64
--> Running transaction check
---> Package gd3php.x86_64 0:2.3.3-7.el7.remi will be installed
--> Processing Dependency: libraqm.so.0()(64bit) for package: gd3php-2.3.3-7.el7.remi.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: gd3php-2.3.3-7.el7.remi.x86_64
---> Package php-common.x86_64 0:7.4.33-8.el7.remi will be updated
--> Processing Dependency: php-common(x86-64) = 7.4.33-8.el7.remi for package: php-xml-7.4.33-8.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.33-8.el7.remi for package: php-sodium-7.4.33-8.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.33-8.el7.remi for package: php-7.4.33-8.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.33-8.el7.remi for package: php-json-7.4.33-8.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.33-8.el7.remi for package: php-cli-7.4.33-8.el7.remi.x86_64
--> Processing Dependency: php-common(x86-64) = 7.4.33-8.el7.remi for package: php-pdo-7.4.33-8.el7.remi.x86_64
---> Package php-common.x86_64 0:7.4.33-15.el7.remi will be an update
--> Running transaction check
---> Package libraqm.x86_64 0:0.7.0-4.el7 will be installed
---> Package libwebp7.x86_64 0:1.0.3-2.el7.remi will be installed
---> Package php.x86_64 0:7.4.33-8.el7.remi will be updated
---> Package php.x86_64 0:7.4.33-15.el7.remi will be an update
---> Package php-cli.x86_64 0:7.4.33-8.el7.remi will be updated
---> Package php-cli.x86_64 0:7.4.33-15.el7.remi will be an update
---> Package php-json.x86_64 0:7.4.33-8.el7.remi will be updated
---> Package php-json.x86_64 0:7.4.33-15.el7.remi will be an update
---> Package php-pdo.x86_64 0:7.4.33-8.el7.remi will be updated
--> Processing Dependency: php-pdo(x86-64) = 7.4.33-8.el7.remi for package: php-oci8-7.4.33-8.el7.remi.x86_64
---> Package php-pdo.x86_64 0:7.4.33-15.el7.remi will be an update
---> Package php-sodium.x86_64 0:7.4.33-8.el7.remi will be updated
---> Package php-sodium.x86_64 0:7.4.33-15.el7.remi will be an update
---> Package php-xml.x86_64 0:7.4.33-8.el7.remi will be updated
---> Package php-xml.x86_64 0:7.4.33-15.el7.remi will be an update
--> Running transaction check
---> Package php-oci8.x86_64 0:7.4.33-8.el7.remi will be updated
---> Package php-oci8.x86_64 0:7.4.33-15.el7.remi will be an update
--> Processing Dependency: libclntsh.so.21.1()(64bit) for package: php-oci8-7.4.33-15.el7.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-oci8-7.4.33-15.el7.remi.x86_64 (remi-php74)
           Requires: libclntsh.so.21.1()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Followed all the instructions above, nothing works. Tried these --skip-broken and rpm -Va --nofiles --nodigest command but no luck.


Solution

  • First, remember that Enterprise Linux 7 have reached its end of life in June.

    So this distribution is unmaintained and insecure.

    Requires: libclntsh.so.21.1()(64bit)

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

    So you need to install the RPM of Oracle Instant Client version 21 to be able to install the RPM of php-oci8

    P.S. The current version of Oracle Instant Client is 23, used by new builds for maintained distributions (EL-8 and EL-9).