Python Http 触发器函数的 VS Code Azure 部署失败 - GLIB_2.27 未找到

VS Code Azure deployment of Python Http Trigger function fails - GLIB_2.27 not found

我正在尝试将本地良好的 运行 函数部署到 Azure

我的requirements.txt

msrest
msrestazure
azure-core
azure-common
azure-functions
azure-identity
azure-storage-blob
azure-keyvault-secrets

部署从这里开始出现问题:

12:41:40 ShopifyWebhookHandler:   python: 3.9.12
12:41:40 ShopifyWebhookHandler: Source directory     : /tmp/zipdeploy/extracted
12:41:40 ShopifyWebhookHandler: Destination directory: /home/site/wwwroot
12:41:41 ShopifyWebhookHandler: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
12:41:41 ShopifyWebhookHandler: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libpthread.so.0: version `GLIBC_2.30' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
12:41:41 ShopifyWebhookHandler: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
12:41:41 ShopifyWebhookHandler: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
12:41:41 ShopifyWebhookHandler: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.26' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
12:41:41 ShopifyWebhookHandler: /tmp/oryx/platforms/python/3.9.12/bin/python3.9: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.27' not found (required by /tmp/oryx/platforms/python/3.9.12/lib/libpython3.9.so.1.0)
12:41:41 ShopifyWebhookHandler: Python Version: /tmp/oryx/platforms/python/3.9.12/bin/python3.9
12:41:41 ShopifyWebhookHandler: Running pip install...
12:41:41 ShopifyWebhookHandler: Done in 0 sec(s).
12:41:43 ShopifyWebhookHandler: /opt/Kudu/Scripts/starter.sh oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -p packagedir=.python_packages/lib/site-packages
12:41:43 ShopifyWebhookHandler: Deployment Failed.
12:41:51 ShopifyWebhookHandler: Deployment failed.

知道如何解决这个问题吗?

还在 Github

上创建了一个 issue

这与 Microsoft Oryx 相关并打开 Github 问题。

Hey folks, apologies for the breaking changes that this issue has caused for your applications.

Oryx has pre-installed Python SDKs on the build images; if the SDK that your application is targeting is not a part of this set, Oryx will fallback to dynamic installation, which attempts to pull a Python SDK that meets your application's requirements from our storage account, where we backup a variety of Python SDKs.

In this case, it appears that the Python 3.9.12 SDK was published to our storage account yesterday around 3:10 PM PST (10:10 PM UTC), and applications targeting Python 3.9 are now pulling down this 3.9.12 SDK rather than the previously published 3.9.7 SDK.

I'm optimistic that we should have this resolved in the next couple of hours, but in the meantime, as folks have mentioned above, if you are able to downgrade your application to using Python 3.8, please consider doing so. Alternatively, if your build/deployment method allows you to snap to a specific patch version of Python, please consider targeting Python 3.9.7, which was the previous 3.9.* version that can be pulled down during dynamic installation.

Again, apologies for the issues that this has caused you all.

Github Issue

暂时尝试将 Python 版本回滚到 Python 3.8。

Azure function cli docs