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.89k stars 337 forks source link

macos-latest(12.7) and PHP 8.1 Library not loaded: libsodium.26.dylib #780

Closed Yurunsoft closed 10 months ago

Yurunsoft commented 10 months ago

Describe the bug

Version

Runners

Operating systems

macos-latest

PHP versions

8.1

To Reproduce

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.1
          tools: pecl
          extensions: >
            apcu, bcmath, curl, openssl, mbstring, intl, json, redis, mysqli, pdo, pdo_mysql, sockets, zip, :opcache

Expected behavior

No problem

Screenshots/Logs

image

dyld[2040]: Library not loaded: '@loader_path/../../../../opt/libsodium/lib/libsodium.26.dylib'
  Referenced from: '/usr/local/Cellar/php@8.1/8.1.[25](https://github.com/imiphp/imi/actions/runs/6780634524/job/18429590036#step:6:26)_1/bin/php'
  Reason: tried: '/usr/local/Cellar/php@8.1/8.1.25_1/bin/../../../../opt/libsodium/lib/libsodium.[26](https://github.com/imiphp/imi/actions/runs/6780634524/job/18429590036#step:6:27).dylib' (no such file), '/usr/local/lib/libsodium.26.dylib' (no such file), '/usr/lib/libsodium.26.dylib' (no such file)

Additional context

macos-latest(12.6.9) OK macos-latest(12.7) error

Are you willing to submit a PR?

SystemKeeper commented 10 months ago

Same happens for PHP 8.0 on macos runner

shivammathur commented 10 months ago

@Yurunsoft @SystemKeeper

Fixed in 2.27.1.

If you use v2 no changes are needed, If you pin the version or hash, please upgrade, Then, please rerun your workflow, it should install correctly now.

SystemKeeper commented 10 months ago

Works fine, thank you very much for the quick fix!