Topic: Problem with zip.so module not installing on php80

Hi,
Today our servers have stopped building and installing php80 correctly. We're getting Class “ZipArchive” not found and zip module is not installed, CLI is throwing an error below.

We're on amazon linux 2, using: https://dl.fedoraproject.org/pub/epel/e … oarch.rpm,
when we install php80-php-zip and run php --version in console: we're getting the error below:

 php --version
PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /opt/remi/php80/root/usr/lib64/php/modules/zip.so (/lib64/libzip.so.5: undefined symbol: ZSTD_minCLevel), /opt/remi/php80/root/usr/lib64/php/modules/zip.so.so (/opt/remi/php80/root/usr/lib64/php/modules/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.0.7 (cli) (built: Jun  1 2021 18:43:05) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.7, Copyright (c), by Zend Technologies

That is related we think to release of:

php80-php-pecl-zip-1.19.3-2.el7.remi.x86_64    [53 KiB]    Changelog by Remi Collet (2021-06-19):
- rebuild with libzip 1.8.0 and zstd support

Any ideas how to fix ? we tried  removing / reinstalling / upgrading to php81 but still the same. We cannot get php80-php-zip to work
Thank you for any help

Re: Problem with zip.so module not installing on php80

Very strange, will try to reproduce, as it should use php80-libzip 1.8.0....

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Thank you,

this is our ansible script to install php80 - if that's helpful ...

- name: Add Remi's RPM repo for Centos 7
  yum:
    name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    state: present

- name: Add Remi's RPM repo for Centos 7
  yum:
    name: rpms.remirepo.net/enterprise/remi-release-7.rpm
    state: present

- name: Add Remi's RPM repo for Centos 7
  command: sudo yum-config-manager --enable remi-php80

- name: Install php80
  yum:
    name: php80
    state: present

- name: Install php80-php-fpm
  yum:
    name: php80-php-fpm
    state: present


- name: install php modules
  yum:
    name:
      #      - php80-php-opcache
      #      - php80-php-xml
      #      - php80-php-mbstring
      #      - php80-php-bcmath
      #      - php80-php-soap
      #      - php80-php-gd
      #      - php80-php-odbc
      #      - php80-php-mysqlnd
      #      - php80-php-intl
      - php80-php-zip
    #      - php80-php-mcrypt
    state: latest
    lock_timeout: 360

Re: Problem with zip.so module not installing on php80

Hmmm... cannot reproduce...

# php --ri zip

zip

Zip => enabled
Zip version => 1.18.2
Libzip headers version => 1.6.1
Libzip library version => 1.8.0
[root@centos8 ~]# php80 --ri zip

# php80 --ri zip

zip

Zip => enabled
Zip version => 1.19.3
Libzip version => 1.8.0
BZIP2 compression => Yes
XZ compression => Yes
ZSTD compression => Yes
AES-128 encryption => Yes
AES-192 encryption => Yes
AES-256 encryption => Yes

# ldd /opt/remi/php80/root/usr/lib64/php/modules/zip.so 
    linux-vdso.so.1 (0x00007ffcce37a000)
    libzip.so.5 => /opt/remi/php80/root/usr/lib64/libzip.so.5 (0x00007f60553a7000)
...

# rpm -qf /opt/remi/php80/root/usr/lib64/libzip.so.5
php80-libzip-1.8.0-1.el8.remi.x86_64

# rpm -Va \*libzip\*
# rpm -qa \*libzip\*
libzip-1.6.1-1.module_el8.3.0+396+9a0d79d6.x86_64
php80-libzip-1.8.0-1.el8.remi.x86_64
Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Opps, I miss you are using old EL-7

But also cannot reproduce

# php80 --ri zip

zip

Zip => enabled
Zip version => 1.19.3
Libzip version => 1.8.0
BZIP2 compression => Yes
XZ compression => Yes
ZSTD compression => Yes
AES-128 encryption => Yes
AES-192 encryption => Yes
AES-256 encryption => Yes

# ldd /opt/remi/php80/root/usr/lib64/php/modules/zip.so
    libzip.so.5 => /lib64/libzip.so.5 (0x00007f96201a3000)
...

# rpm -qf /lib64/libzip.so.5
libzip5-1.8.0-1.el7.remi.x86_64

Please check, especially "rpm -qf /lib64/libzip.so.5"

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

> this is our ansible script to install php80 - if that's helpful ...
>  command: sudo yum-config-manager --enable remi-php80
>       - php80-php-zip

BTW, your configuration is not consistent.

You should read https://blog.remirepo.net/pages/English-FAQ#scl
And for a proper installation, follow the Wizard instructions (link on top right corner of all pages)

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Hi,

Let me try upgrade ( if that may help ? ) I've tried on amazon linux 2 without anything else installed ( just that ansible php script )  and getting the same results:

php80 --ri zip
PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /opt/remi/php80/root/usr/lib64/php/modules/zip.so (/lib64/libzip.so.5: undefined symbol: ZSTD_minCLevel), /opt/remi/php80/root/usr/lib64/php/modules/zip.so.so (/opt/remi/php80/root/usr/lib64/php/modules/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Extension 'zip' not present.
[root@ip-172-16-2-106 ansible]# rpm -qf /lib64/libzip.so.5
libzip5-1.8.0-1.el7.remi.x86_64

Re: Problem with zip.so module not installing on php80

Hmm.. sorry, I badly read the error message.

> undefined symbol: ZSTD_minCLevel

This means you are using a outdated libzstd (< 1.3.6)

# rpm -q libzstd
libzstd-1.5.0-1.el7.x86_64

The proper version is in EPEL
Please update your system

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Thank you for digging in,

do you know how to upgrade it on amazon linux 2 ?

Re: Problem with zip.so module not installing on php80

Sorry cannot reproduce on amzn2

Using simple docker file
https://git.remirepo.net/cgit/tools/doc … dockerfile

zip

Zip => enabled
Zip version => 1.19.3
Libzip version => 1.8.0
BZIP2 compression => Yes
XZ compression => Yes
ZSTD compression => Yes
AES-128 encryption => Yes
AES-192 encryption => Yes
AES-256 encryption => Yes

Please, paste output of

# rpm -qf /lib64/libzip.so.5
# rpm -qi libzip5
Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Output below:

rpm -qf /lib64/libzip.so.5
libzip5-1.8.0-1.el7.remi.x86_64
rpm -qi libzip5
Name        : libzip5
Version     : 1.8.0
Release     : 1.el7.remi
Architecture: x86_64
Install Date: Mon Jun 21 08:20:49 2021
Group       : Unspecified
Size        : 128116
License     : BSD
Signature   : DSA/SHA1, Sat Jun 19 05:56:22 2021, Key ID 004e6f4700f97f56
Source RPM  : libzip5-1.8.0-1.el7.remi.src.rpm
Build Date  : Sat Jun 19 05:45:48 2021
Build Host  : builder.remirepo.net
Relocations : (not relocatable)
Packager    : Remi Collet
Vendor      : Remi's RPM repository
URL         : https://libzip.org/
Bug URL     : 
Summary     : C library for reading, creating, and modifying zip archives
Description :
libzip is a C library for reading, creating, and modifying zip archives. Files
can be added from data buffers, files, or compressed data copied directly from
other zip archives. Changes made without closing the archive can be reverted.
The API is documented by man pages.

libzip5 is designed to be installed beside libzip.

Re: Problem with zip.so module not installing on php80

Sorry, I mean

# rpm -qf /lib64/libzstd.so.1
# rpm -qi libzstd
Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

rpm -qf /lib64/libzstd.so.1
libzstd-1.3.3-1.amzn2.0.1.x86_64
rpm -qi libzstd
Name        : libzstd
Version     : 1.3.3
Release     : 1.amzn2.0.1
Architecture: x86_64
Install Date: Mon Jun 21 08:20:49 2021
Group       : Unspecified
Size        : 515386
License     : BSD and GPLv2
Signature   : RSA/SHA256, Fri Aug 24 20:05:52 2018, Key ID 11cf1f95c87f5b1a
Source RPM  : zstd-1.3.3-1.amzn2.0.1.src.rpm
Build Date  : Thu Aug 16 05:53:54 2018
Build Host  : build.amazon.com
Relocations : (not relocatable)
Packager    : Amazon Linux
Vendor      : Amazon Linux
URL         : https://github.com/facebook/zstd
Summary     : Zstd shared library
Description :
Zstandard compression shared library.

Re: Problem with zip.so module not installing on php80

> libzstd-1.3.3-1.amzn2.0.1.x86_64

OK, so you really need something >= 1.3.6
So libzstd 1.5.0 from EPEL seems FAR better

BTW, I will add a explicit dependency on this version in next build


amzn2 is definitively a very bad thing...

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

any ideas how I can upgrade ( So libzstd 1.5.0 from EPEL seems FAR better ) ?
Or when is your next build ?

Re: Problem with zip.so module not installing on php80

> any ideas how I can upgrade

yum update

> Or when is your next build ?

Already uploaded
Soon on all mirrors (in the next hours)


P.S. for memory, workaround applied in
https://git.remirepo.net/cgit/rpms/lib/ … 6cda3e56c5

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Still no luck, yum update throws the error below now, any ideas ?

yum update
Failed to set locale, defaulting to C
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
276 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package libzip5.x86_64 0:1.8.0-1.el7.remi will be updated
---> Package libzip5.x86_64 0:1.8.0-2.el7.remi will be an update
--> Processing Dependency: libzstd(x86-64) >= 1.3.6 for package: libzip5-1.8.0-2.el7.remi.x86_64
--> Finished Dependency Resolution
Error: Package: libzip5-1.8.0-2.el7.remi.x86_64 (remi-safe)
           Requires: libzstd(x86-64) >= 1.3.6
           Installed: libzstd-1.3.3-1.amzn2.0.1.x86_64 (@amzn2-core)
               libzstd(x86-64) = 1.3.3-1.amzn2.0.1
           Available: libzstd-1.3.3-1.amzn2.x86_64 (amzn2-core)
               libzstd(x86-64) = 1.3.3-1.amzn2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Re: Problem with zip.so module not installing on php80

> 276 packages excluded due to repository priority protections

Fix this (disabling the priority plugin, as explain in the FAQ https://blog.remirepo.net/pages/English-FAQ#arch)

And check that EPEL is properly enabled.

As said previously, it works for me on amzn2 using a simple docker test file
So your configuration is broken.

Yes, there was a minor issue which allow to install on a broken configuration, resulting in a broken installation,  which is now fixed, and thus forbid you to install on such a configuration

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Please understand that my repository is designed for RHEL and clones (CentOS and others)

Amzn is a Frankenstein distribution

It may work, by luck (most of the time)
And its support is really a "best effort"

Desktop: Fedora 33 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 34 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Problem with zip.so module not installing on php80

Thank you.

yum update --disableplugin=priorities

Did the trick. Thank you again for all your support.