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

Could not install memcached-3.1.5 on PHP 7.4.15 #423

Closed
1 of 2 tasks
ruudk opened this issue Mar 3, 2021 · 25 comments
Closed
1 of 2 tasks

Could not install memcached-3.1.5 on PHP 7.4.15 #423

ruudk opened this issue Mar 3, 2021 · 25 comments
Assignees
Labels
bug Something isn't working

Comments

@ruudk
Copy link

ruudk commented Mar 3, 2021

Describe the bug
memcached fails installing since today.

Version
2.10.0

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems
Linux

PHP versions
7.4

To Reproduce

            -   name: Setup PHP
                uses: shivammathur/setup-php@2.10.0
                with:
                    php-version: 7.4
                    tools: cs2pr
                    extensions: mbstring,bcmath,intl,gd,zip,memcached-3.1.5,redis-5.3.3,rdkafka-5.0.0
                env:
                    fail-fast: true

Expected behavior
This suddenly broke today.

Screenshots/Logs


==> Setup PHP
✓ PHP Switched to PHP 7.4.15

==> Setup Tools
✓ composer Added composer 2.0.11
✓ cs2pr Added cs2pr 1.4.0

==> Setup Extensions
✓ mbstring Enabled
✓ bcmath Enabled
✓ intl Enabled
✓ gd Enabled
✓ zip Enabled
✗ memcached Could not install memcached-3.1.5 on PHP 7.4.15
@ruudk ruudk added the bug Something isn't working label Mar 3, 2021
@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

When I install memcached instead of memcached-3.1.5 it works.

@shivammathur
Copy link
Owner

shivammathur commented Mar 3, 2021

@ruudk

Yes memcached package is 3.1.5. So you can just specify memcached without version and it should work.

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
    php-version: 7.4
    extensions: memcached

Test workflow: https://github.com/shivammathur/test-setup-php/runs/2021730562?check_suite_focus=true

If you want to compile using pecl, you will have to install libmemcached-dev for memcached and librdkafka-dev for rdkafka before running setup-php.

- name: Install required libraries 
  run: sudo apt-get install -y libmemcached-dev librdkafka-dev
- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
      php-version: 7.4
      tools: cs2pr
      extensions: mbstring,bcmath,intl,gd,zip,memcached-3.1.5,redis-5.3.3,rdkafka-5.0.0

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

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

But it's weird that I had this config for a very long time without issues, and today it broke all of a sudden. When you specify the version, will it then always install from source?

@shivammathur
Copy link
Owner

Since memcached is pre-installed and the input version matches like right now it both 3.1.5 in package and in input, It is just enabled, when they differ the extension is installed from source using pecl.

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

So this is the rule:

  • When no version provided, use default installed version (no pecl install)
  • When version is provided and matches the default installed version, just enable it (no pecl install)
  • When version provided and does not match the default installed version, install it from pecl

?

@shivammathur
Copy link
Owner

Yes

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

Then how come it broke today? Because I provide memcached-3.1.5 and that's the default installed version, but I still get: ✗ memcached Could not install memcached-3.1.5 on PHP 7.4.15

@shivammathur
Copy link
Owner

Can you please give me link to the logs where it is failing.

@shivammathur
Copy link
Owner

I'm not able to reproduce the issue with PHP 7.4: https://github.com/shivammathur/test-setup-php/actions/runs/617493608/workflow

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

Created a PR with my config, but it does not start the workflow: shivammathur/test-setup-php#3

@alexsegura
Copy link

The same happens with Redis

- name: Setup PHP
   uses: shivammathur/setup-php@v2
   with:
     php-version: '7.4'
     tools: composer:v2, phpstan, redis
==> Setup PHP
✓ PHP Switched to PHP 7.4.15

==> Setup Tools
✓ composer Added composer 2.0.11
✓ phpstan Added phpstan 0.12.80
✗ redis Tool redis is not supported

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

should be extension, no?

@alexsegura
Copy link

@ruudk well it was working until today 🤷‍♂️

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

Ok, glad to hear I'm not crazy 😅 Something did change today

@alexsegura
Copy link

alexsegura commented Mar 3, 2021

I see some changes about Redis & other things between 2.9.0 and 2.10.0

What is strange is that 2.10.0 was released 8 days ago... maybe there's some cache on GitHub Actions, and it was actually invalidated today? In the workflow run output, you can't know what version of the action is used.

Probably, this will work:

uses: shivammathur/setup-php@2.9.0

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

@alexsegura See this comment shivammathur/test-setup-php#3 (comment)

@shivammathur
Copy link
Owner

shivammathur commented Mar 3, 2021

@alexsegura redis is not supported as a tool, it is supported as an extension. Please create a separate issue and provide your workflow. I will have a look.

@alexsegura
Copy link

@shivammathur like I said, it used to work just like that.
Don't worry, I will wait until you fix this issue, and fix my workflow accordingly.

@shivammathur
Copy link
Owner

shivammathur commented Mar 3, 2021

@ruudk
The issue was in ubuntu-20.04 image, which was deployed yesterday. memcached was not installed in the build for PHP 7.4.

if you install libmemcached-dev above setup-php when specifying the memcached version. It will install memached successfully, or you can just specify memcached without version and it will install from the package.

Both of these should work

- name: Install required libraries 
  run: sudo apt-get install -y libmemcached-dev librdkafka-dev
- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
      php-version: 7.4
      extensions: memcached-3.1.5
- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
    php-version: 7.4
    extensions: memcached

@ruudk
Copy link
Author

ruudk commented Mar 3, 2021

Thanks for debugging this.

I will add libmemcached-dev. But shouldn't setup-php detect that memcached-3.1.5 is included already and just enable that instead? Without failure.

@shivammathur
Copy link
Owner

Yes, that can be improved in future release here. I will make a note of it.

This issue was caused by change in how ondrej/ppa packages are built.
More details here.
https://www.patreon.com/posts/47793617

I will create a pull request to the actions images to get this fixed.

@shivammathur
Copy link
Owner

Should be fixed, once this is merged and deployed
actions/runner-images#2834

@ruudk
Copy link
Author

ruudk commented Mar 4, 2021

@shivammathur Now that actions/runner-images#2834 is merged, should it work immediately?

@shivammathur
Copy link
Owner

shivammathur commented Mar 4, 2021

@ruudk No, it will have to be deployed first. There will be a release on actions/virtual-environment Ubuntu 20.04 20210304.2 or newer when they start deploying it. Till then please use #423 (comment)

@shivammathur
Copy link
Owner

@ruudk Fix has been deployed and memcached-3.1.5 should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants