开发者社区 > 云原生 > Serverless > 正文

为什么部署失败,回滚到成功的版本也失败呀? runtime: python3.9 错误是: WAR

为什么部署失败,回滚到成功的版本也失败呀? runtime: python3.9

错误是: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

2023-03-10 22:57:45 WARN 1-640b4537-3b09ae27a9e7017fac21b34b - s info failed, attempt to retry, error: Command failed with exit code 1: s info --access 1678460215236 --output 1678460215236.output

ERROR: TypeError: Invalid output format: 1678460215236.output.

Please use one of default, json, yaml, raw

, {"shortMessage":"Command failed with exit code 1: s info --access 1678460215236 --output 1678460215236.output","command":"s info --access 1678460215236 --output 1678460215236.output","escapedCommand":""s info" "--access 1678460215236" "--output 1678460215236.output"","exitCode":1,"stdout":"\nERROR:\nTypeError: Invalid output format: 1678460215236.output.\n\nPlease use one of default, json, yaml, raw\n\n","stderr":"","failed":true,"timedOut":false,"isCanceled":false,"killed":false}

2023-03-10 22:57:46 ERROR 1-640b4537-3b09ae27a9e7017fac21b34b - Failed to deploy, errorMsg:[Command failed with exit code 1: s info --access 1678460215236 --output 1678460215236.output

ERROR: TypeError: Invalid output format: 1678460215236.output.

Please use one of default, json, yaml, raw

]

{'errorMessage': "Unable to import module 'index'", 'errorType': 'ImportModuleError', 'stackTrace': ["ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /code/cryptography/hazmat/bindings/_openssl.abi3.so)"]}

系统环境变了?怎么突然报错 /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /code/cryptography/hazmat/bindings/_openssl.abi3.so

展开
收起
云上静思 2023-03-12 10:07:55 1396 0
3 条回答
写回答
取消 提交回答
  • 天下风云出我辈,一入江湖岁月催,皇图霸业谈笑中,不胜人生一场醉。

    cd /usr/local/python3 python3 -m venv tutorial-env source tutorial-env/bin/activate 再次尝试pip命令

    2023-03-12 22:39:31
    赞同 展开评论 打赏
  • 复制一下,试试custom runtime 10

    此答案来自钉钉群“阿里函数计算官网客户"

    2023-03-12 18:13:39
    赞同 展开评论 打赏
  • 根据错误信息看,部署失败的原因是在部署过程中运行了pip命令,而使用root用户运行pip命令可能会导致权限问题,所以推荐使用虚拟环境。如果您没有在部署时使用虚拟环境,可以尝试在代码中使用虚拟环境。同时,您可以检查一下您的操作系统和运行时环境是否发生了变化。

    至于为什么回滚到成功版本后也失败了,这可能是因为您的代码依赖于特定的系统库版本,而成功版本的部署环境与当前部署环境不同,导致在回滚后依然无法正常运行。建议您尝试更新依赖库或调整代码以解决这个问题。

    2023-03-12 11:10:01
    赞同 展开评论 打赏
问答分类:
问答地址:

快速交付实现商业价值。

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载