简体   繁体   English

我试图在 AWS 弹性豆茎上部署 flask 应用程序,但收到此错误

[英]I was trying to deploy a flask app on AWS elastic beanstalk, but am getting this error

2021/03/29 20:18:33.034586 [ERROR] An error occurred during execution of command [app-deploy] - [InstallDependency]. Stop running the command. Error: fail to install dependencies with requirements.txt file with error Command /bin/sh -c /var/app/venv/staging-LQM1lest/bin/pip install -r requirements.txt failed with error exit status 1. Stderr:    ERROR: Command errored out with exit status 1:
     command: /var/app/venv/staging-LQM1lest/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fywg_th6/mysqlclient_03fe0c7d79f0459190ffa7e229b7666a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fywg_th6/mysqlclient_03fe0c7d79f0459190ffa7e229b7666a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-kktixq46
         cwd: /tmp/pip-install-fywg_th6/mysqlclient_03fe0c7d79f0459190ffa7e229b7666a/
    Complete output (15 lines):
    /bin/sh: mysql_config: command not found
    /bin/sh: mariadb_config: command not found
    /bin/sh: mysql_config: command not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-fywg_th6/mysqlclient_03fe0c7d79f0459190ffa7e229b7666a/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/tmp/pip-install-fywg_th6/mysqlclient_03fe0c7d79f0459190ffa7e229b7666a/setup_posix.py", line 70, in get_config
        libs = mysql_config("libs")
      File "/tmp/pip-install-fywg_th6/mysqlclient_03fe0c7d79f0459190ffa7e229b7666a/setup_posix.py", line 31, in mysql_config
        raise OSError("{} not found".format(_mysql_config_path))
    OSError: mysql_config not found
    mysql_config --version
    mariadb_config --version
    mysql_config --libs

I used pymysql instead of Flask-MySQLdb and mysqlclient.我使用 pymysql 而不是 Flask-MySQLdb 和 mysqlclient。 Worked fine after that.之后工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试将Flask App部署到AWS Elastic Beanstalk时出错 - Error when Trying to Deploy Flask App to AWS Elastic Beanstalk 尝试将 Flask 应用程序部署到 AWS Elastic Beanstalk 时,我不断收到“ModuleNotFoundError: No module named &#39;app&#39;”错误消息 - When trying to deploy a Flask app to AWS Elastic Beanstalk, I keep getting the "ModuleNotFoundError: No module named 'app'" error message AWS Elastic Beanstalk 错误我无法部署 - AWS Elastic Beanstalk error I cannot deploy 如何使用应用程序工厂将Flask应用程序部署到AWS Elastic beantalk - How to deploy Flask app to AWS Elastic beanstalk using an application factory 如何在AWS弹性beanstalk上部署结构化Flask应用程序 - How to deploy structured Flask app on AWS elastic beanstalk 尝试部署Flask应用程序时,从beantalk中获取错误:“没有名为flask的模块” - Getting error from beanstalk when trying to deploy flask app: “no module named flask” ImportError - 将Falcon应用程序部署到AWS Elastic Beanstalk - ImportError - deploy Falcon app to AWS Elastic Beanstalk 在 AWS Elastic Beanstalk 中部署 Flask 应用程序 - Deploying Flask App in AWS Elastic Beanstalk 如何将 Visual Studio Flask 应用程序部署到 Elastic Beanstalk - How to deploy Visual Studio Flask app to Elastic Beanstalk 使用 AWS Elastic Beanstalk 托管 Django 应用程序时出错 - Error in hosting Django app with AWS Elastic Beanstalk
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM