运行 aws lambda python 3.9 时找不到版本“GLIBC_2.28”

问题描述 投票:0回答:1

当我运行 aws lambda 时,突然出现此错误: “无法导入模块“lambda_name”:/lib64/libc.so.6:找不到版本“GLIBC_2.28”(/var/task/cryptography/hazmat/bindings/_rust.abi3.so 需要)

我正在使用 python 运行时 3.9 并具有以下requirements.txt:

boto3
botocore
pycparser
pyopenssl
certifi
cffi
python amazon-web-services lambda
1个回答
0
投票

为了解决该错误,我在临时虚拟环境中安装了 Snowflake-connector-python==2.7.9 库。然后使用该环境创建 Lambda 层 zip 文件。这是我使用的命令:

pip3 install \
--platform manylinux2010_x86_64 \
--implementation cp \
--only-binary=:all: --upgrade \
--target venv/lib/python3.10/site-packages/ \
 snowflake-connector-python==2.7.9 boto3>=1.26.153 botocore>=1.29.153

您可能还想查看 Aws lambda returns /lib64/libc.so.6: version `GLIBC_2.28' not found

© www.soinside.com 2019 - 2024. All rights reserved.