shivammathur / setup-php

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
https://setup-php.com
MIT License
2.85k stars 334 forks source link

Unable to load dynamic library zip.so #831

Closed lackovic10 closed 3 months ago

lackovic10 commented 3 months ago

Describe the bug

PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/lib/php/20220829/zip.so (libzip.so.4: cannot open shared object file: No such file or directory), /usr/lib/php/20220829/zip.so.so (/usr/lib/php/20220829/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Version

Runners

Operating systems base-default (should be ubuntu-latest)

PHP versions 8.2

To Reproduce

- name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.2'
          extensions: none, igbinary, redis, apcu, gd, bcmath, mbstring, SimpleXml, curl, dom, tokenizer, xml, xmlwriter, opcache, fileinfo, xmlreader, intl, mysqli, sockets, iconv

Expected behavior ✓ zip Enabled

shivammathur commented 3 months ago

You have specified none as the first item in the extensions input. That disabled all shared extensions. So, in this case you need to specify all the extensions that you need. Please add zip to that list after none.

Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/8533950650/workflow

lackovic10 commented 3 months ago

thank you @shivammathur for the quick response i've copied the extension list without zip to the pull request description by accident

lackovic10 commented 3 months ago

i maybe wasn't clear with my previous comment, the zip extension was in the list when i got the error a colleague fixed the issue by using a self hosted runner with Ubuntu 22.04, and leaving the following extension list: igbinary, redis-phpredis/phpredis@5.3.7, apcu, gd, bcmath

thank you again for looking into this!