在 aws api 网关中出现“GLIBC_2.18”未找到错误

getting `GLIBC_2.18' not found error in aws api gateway

我正在 aws chalice 中写 Api。 我的代码在本地运行良好。

但我收到以下回复: { "message": "Internal server error" } 我的 requirements.txt 文件包含:

web3==5.12.1
pycryptodome==3.9.8

在签入 aws api 网关时。发现以下错误:

错误信息:

{"errorMessage": "Unable to import module 'app': /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /var/task/rusty_rlp.cpython-37m-x86_64-linux-gnu.so)", "errorType": "Runtime.ImportModuleError"}
Fri Sep 18 13:47:33 UTC 2020 : Lambda execution failed with status 200 due to customer function error: Unable to import module 'app': /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /var/task/rusty_rlp.cpython-37m-x86_64-linux-gnu.so). Lambda request id: b8a849f9-2982-49a6-a010-f6a2dbe1655e

更改 mu 需求文件解决了它:

eth-account==0.5.2
rlp==1.2.0
web3==5.10.0