-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
PHP Startup: Unable to load dynamic library 'gnupg.so' (tried: /opt/bref/extensions/gnupg.so (libgpgme.so.11: cannot open shared object file: No such file or directory) #443
Comments
We will need more details to help. |
I've been digging into it and I think I have found the issue although not the solution yet. The problem is that libgpgme.so.11 and libassuan.so.0 aren't in any of the library paths. I created a layer that added them which appears to work but then has a libc version mismatch error. It's easy to replicate using this serverless.yml: service: PGP-Encrypt provider: plugins: functions: package: And the test.php file from the repo in the gnupg layer |
Similar issue in PHP 8.3. A warning instead of initial error was reported.
Here are my project files. composer.json: {
"require": {
"bref/bref": "^2.1.12",
"bref/extra-php-extensions": "^1.4.0"
}
} serverless.yml service: bref-demo
provider:
name: aws
region: us-east-1
plugins:
- ./vendor/bref/bref
- ./vendor/bref/extra-php-extensions
functions:
hello:
handler: index.php
description: ''
runtime: php-83
layers:
- ${bref-extra:gnupg-php-83}
# Exclude files from deployment
package:
patterns:
- '!tests/**' index.php: <?php declare(strict_types=1);
require __DIR__ . '/vendor/autoload.php';
return function ($event) {
phpinfo();
return 'Hello ' . ($event['name'] ?? 'world');
}; |
Fixed in the latest release. |
I appreciate your addressing this error, as I recently encountered it myself. Upgrading to the latest version fixes this particular error for me. However, I'm getting a new error a few steps later:
The same code works fine in Docker ( |
Hi David! Thanks for the report. It's a shame I don't know if the person that originally contributed this extension ever got it to work. I've never used the extension so I don't know where to start for a quick fix 😬 |
Thanks for the fix. I haven't tried it yet but I'm currently handling my use case with a separate EC2 instance so I will definitely try to get this working as it's much cleaner than my current workaround.
…________________________________
From: Matthieu Napoli ***@***.***>
Sent: Thursday, August 29, 2024 9:44 AM
To: brefphp/extra-php-extensions ***@***.***>
Cc: Matthew Schertz ***@***.***>; Author ***@***.***>
Subject: Re: [brefphp/extra-php-extensions] PHP Startup: Unable to load dynamic library 'gnupg.so' (tried: /opt/bref/extensions/gnupg.so (libgpgme.so.11: cannot open shared object file: No such file or directory) (Issue #443)
Hi David! Thanks for the report. It's a shame I don't know if the person that originally contributed this extension ever got it to work. I've never used the extension so I don't know where to start for a quick fix 😬
—
Reply to this email directly, view it on GitHub<#443 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABLBF65WIGSP3TQSISAHR7TZT4QTTAVCNFSM6AAAAAAX457BBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJXGY4TOOJRGY>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I've organized a clean reproduction of the problem and created a separate issue for it: #556 |
When using the gnupg-php-82 this error message appears in the Cloudwatch logs for the Lambda function.
The text was updated successfully, but these errors were encountered: