You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
Unable to import module 'api': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/sls-py-req/cryptography/hazmat/bindings/_rust.abi3.so) #765
I have searched existing issues, it hasn't been reported yet
Issue description
I get the below error after deploy serverless lambda function.
Unable to import module 'api': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/sls-py-req/cryptography/hazmat/bindings/_rust.abi3.so)
sls deploy --stage dev --region ap-east-1 --verbose
Command output
Adding Python requirements helper to apis/xxxxx
Adding Python requirements helper to apis/yyyyy
Generated requirements from /home/runner/work/apis/xxxxx/requirements.txt in /home/runner/work/.serverless/apis/xxxxx/requirements.txt
Installing requirements from "/home/runner/.cache/serverless-python-requirements/52e8e73b448018a1369d4f64ef169579fb6397704f9a51744dfa78c2a6e65611_x86_64_slspyc/requirements.txt"
Using download cache directory /home/runner/.cache/serverless-python-requirements/downloadCacheslspyc
Running ...
Generated requirements from /home/runner/work/apis/yyyyy/requirements.txt in /home/runner/work/.serverless/apis/yyyyy/requirements.txt
Installing requirements from "/home/runner/.cache/serverless-python-requirements/deedc524f94a2ae84b643da28db4779abd06c0e4362c975c7473481cdbcc8a6f_x86_64_slspyc/requirements.txt"
Using download cache directory /home/runner/.cache/serverless-python-requirements/downloadCacheslspyc
Running ...
Zipping required Python packages for apis/xxxxx
Zipping required Python packages for apis/yyyyy
Excluding development dependencies forfunction"xxxxx"
Excluding development dependencies forfunction"yyyyy"
Removing Python requirements helper from apis/xxxxx
Removing Python requirements helper from apis/yyyyy
Injecting required Python packages to package
I had a similar issue recently after updating bcrypt, and found adding the following to pythonRequirements helped with this issue (not that I really know what's happening here, but plenty of posts elsewhere pointed to this);
My particular use case was that I wanted to use the AWS Lambda Python 3.11 runtime but a transient dependency, pendulum, did not have native builds past Python 3.9. I ended up just dockerizing pip which enabled all native dependencies to be built if needed:
@rsyring The issue with cache is that sometimes if you build e.g. without dockerization and end up with broken build for given arch, the result would still be cached and reused in the next packaging attempt
Activity
danielward commentedon Apr 13, 2023
I had a similar issue recently after updating bcrypt, and found adding the following to
pythonRequirementshelped with this issue (not that I really know what's happening here, but plenty of posts elsewhere pointed to this);Areix commentedon Apr 14, 2023
it works like charm, thanks!
aiglesiasn commentedon May 19, 2023
I had a similar problem but I solved by using
venv(not dockerize it), but use this syntax:For ARM
FOR X86_64
It never worked with:
rsyring commentedon Nov 10, 2023
My particular use case was that I wanted to use the AWS Lambda Python 3.11 runtime but a transient dependency, pendulum, did not have native builds past Python 3.9. I ended up just dockerizing pip which enabled all native dependencies to be built if needed:
Not exactly sure why the cache needed to be disabled but without it the reqs weren't getting updated as I expected. Need to look into that more.
pgrzesik commentedon Nov 12, 2023
@rsyring The issue with cache is that sometimes if you build e.g. without dockerization and end up with broken build for given arch, the result would still be cached and reused in the next packaging attempt