-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
File too short on shared library libpcre2-8.so.0 #21
Comments
Same issue here when running locally using sam-cli. Is this layer compatible with sam-cli? |
You can get it running on sam cli, but you'll need to unzip the layer zip manually yourself and change your There's a PR open at sam-cli to fix the symlink issue, but it doesn't look like it's had much love recently: aws/aws-sam-cli#1482 |
Thanks! That explains it, and the example should get me started. I got the error running locally and the code never made it to production yet because of it. Is there reason to believe it would work if I pushed it to AWS? |
Yep, absolutely – it's purely a bug in sam cli. If you use docker-lambda directly you should be able to get it to work locally (you'll just need to mount the layer directory manually) |
Unrelated to sam-cli, this issue was resolved for me by ensuring git, if run within a child process within Lambda, is provided |
Hi!
I am trying to run git with this layer in a SAM lambda build.
Template snippet:
Code snippet:
subprocess.call(['git', 'init', '/tmp/Apps/CDN/'])
or
os.system('cd /tmp/Apps/CDN && git init')
All attempts fail with
git: error while loading shared libraries: /opt/lib/libpcre2-8.so.0: file too short
I also tried using the second version of the layer (despite py3.7 not being listed for it) instead, but that also fail with the same error.
Any ideas how this can be solved?
The text was updated successfully, but these errors were encountered: