解决Django Elastic Beanstalk与RDS MySQL连接问题
P粉716228245
P粉716228245 2023-08-28 20:40:41
[MySQL讨论组]

我正在尝试将我的Django Elastic Beanstalk连接到我的RDS MySQL。我的Django通过localhost与我的RDS MySQL工作正常,但是当我尝试将我的Django上传到Elastic Beanstalk时,我得到了“部署应用程序失败”的错误,并且AWS显示了以下错误。我的项目在requirements.txt中有mysqlclient,就像这里所示:

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-rds.html

根据该页面,这应该足够了。我当然尝试过搜索类似的问题,但迄今为止没有成功。我注意到许多问题都提到需要在.ebextensions文件夹中有一个packages.config文件,我尝试了其中许多建议,但没有成功。这是问题吗?为什么AWS页面上没有提到这一点?

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /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 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/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
      [end of output]

P粉716228245
P粉716228245

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号