Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load dynamic library in Self Hosted Runner #554

Closed
2 of 5 tasks
Moser-ss opened this issue Jan 12, 2022 · 1 comment
Closed
2 of 5 tasks

Unable to load dynamic library in Self Hosted Runner #554

Moser-ss opened this issue Jan 12, 2022 · 1 comment
Assignees
Labels
workflow-edit Issue can be fixed by editing the GitHub Action workflow

Comments

@Moser-ss
Copy link

Describe the bug
When I am setting up the PHP in a SelfHosted runner I got this Warning message
PHP Warning: PHP Startup: Unable to load dynamic library to multiple libraries.
When I check inside of the Runner the file exists with the following permission

ls -la /usr/lib/php/20190902/amqp.so
-rw-r--r-- 1 root root 175072 Dec 31 08:14 /usr/lib/php/20190902/amqp.so

This issue doesn't happen in the GitHub Hosted Runner, so I don't know if is a permissions issue because the runner in the self-hosted runner is been executed with the user runner

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Linux Ubutunu:20.04

PHP versions
'7.4'

To Reproduce

jobs:
  cloud-test:
    runs-on: 
    - selfhost-php
    timeout-minutes: 10
    steps:
      - name: Checkout ${{ github.repository }}
        uses: actions/checkout@v2
        with:
          fetch-depth: 1
          ref: ${{ github.head_ref }}

      - name: Setup SSH KEY
        uses: webfactory/ssh-agent@v0.5.4
        with:
          ssh-private-key: ${{ secrets.GHA_SSH_PRIVATE_KEY }}

      
      - name: Setup PHP with PECL extension
        uses: shivammathur/setup-php@v2
        with:
          php-version: '7.4'
          extensions: apcu, ast
          ini-values: memory_limit=1024m,apc.enable_cli=1
          coverage: xdebug
          tools: pecl,composer
        env:
          COMPOSER_TOKEN: ${{ secrets.GHA_ACCESS_TOKEN }}
      - name: Get composer cache directory
        id: composer-cache
        run: echo "::set-output name=dir::$(composer config cache-files-dir)"

Expected behavior
Not showing the warning messages when setting up the PHP

Screenshots/Logs

==> Setup PHP
PHP Warning:  PHP Startup: Unable to load dynamic library 'amqp.so' (tried: /usr/lib/php/20190902/amqp.so (librabbitmq.so.4: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/amqp.so.so (/usr/lib/php/20190902/amqp.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'dba.so' (tried: /usr/lib/php/20190902/dba.so (libqdbm.so.14: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/dba.so.so (/usr/lib/php/20190902/dba.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib/php/20190902/gd.so (libgd.so.3: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/gd.so.so (/usr/lib/php/20190902/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Additional context
To manage the self-hosted runners I am using the actions-runner-controller and I am using the image from the project summerwind/actions-runner:latest
Are you willing to submit a PR?

@Moser-ss Moser-ss added the bug Something isn't working label Jan 12, 2022
@shivammathur
Copy link
Owner

shivammathur commented Jan 12, 2022

For self-hosted runners please specify the runner environment variable as self-hosted. Also please start with a clean container after setting it.

- name: Setup PHP with PECL extension
  uses: shivammathur/setup-php@v2
  with:
    php-version: '7.4'
    extensions: apcu, ast
    ini-values: memory_limit=1024m,apc.enable_cli=1
    coverage: xdebug
    tools: pecl,composer
  env:
    runner: self-hosted
    COMPOSER_TOKEN: ${{ secrets.GHA_ACCESS_TOKEN }}

Docs: https://github.com/shivammathur/setup-php#self-hosted-setup

@shivammathur shivammathur added workflow-edit Issue can be fixed by editing the GitHub Action workflow and removed bug Something isn't working labels Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
workflow-edit Issue can be fixed by editing the GitHub Action workflow
Projects
None yet
Development

No branches or pull requests

2 participants