<legend id='8giGH'><style id='8giGH'><dir id='8giGH'><q id='8giGH'></q></dir></style></legend>

      <small id='8giGH'></small><noframes id='8giGH'>

      <tfoot id='8giGH'></tfoot>
      <i id='8giGH'><tr id='8giGH'><dt id='8giGH'><q id='8giGH'><span id='8giGH'><b id='8giGH'><form id='8giGH'><ins id='8giGH'></ins><ul id='8giGH'></ul><sub id='8giGH'></sub></form><legend id='8giGH'></legend><bdo id='8giGH'><pre id='8giGH'><center id='8giGH'></center></pre></bdo></b><th id='8giGH'></th></span></q></dt></tr></i><div id='8giGH'><tfoot id='8giGH'></tfoot><dl id='8giGH'><fieldset id='8giGH'></fieldset></dl></div>
        <bdo id='8giGH'></bdo><ul id='8giGH'></ul>

      1. 我如何解决“OSError: mysql_config not found"?Elast

        时间:2023-06-06
            <tbody id='TkWBm'></tbody>
              <tfoot id='TkWBm'></tfoot>

                <bdo id='TkWBm'></bdo><ul id='TkWBm'></ul>

                  <i id='TkWBm'><tr id='TkWBm'><dt id='TkWBm'><q id='TkWBm'><span id='TkWBm'><b id='TkWBm'><form id='TkWBm'><ins id='TkWBm'></ins><ul id='TkWBm'></ul><sub id='TkWBm'></sub></form><legend id='TkWBm'></legend><bdo id='TkWBm'><pre id='TkWBm'><center id='TkWBm'></center></pre></bdo></b><th id='TkWBm'></th></span></q></dt></tr></i><div id='TkWBm'><tfoot id='TkWBm'></tfoot><dl id='TkWBm'><fieldset id='TkWBm'></fieldset></dl></div>

                • <legend id='TkWBm'><style id='TkWBm'><dir id='TkWBm'><q id='TkWBm'></q></dir></style></legend>

                  <small id='TkWBm'></small><noframes id='TkWBm'>

                • 本文介绍了我如何解决“OSError: mysql_config not found"?Elastic Beanstalk 部署期间出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  问题

                  我正在尝试使用小型数据库后端在 Elastic Beanstalk 上部署一个非常简单的应用程序.我尝试安装 mysqlclient 作为 AWS 此处.但是,当我部署我的应用程序时,我在尝试下载包时从我的 Elastic Beanstalk 日志中收到以下错误:

                  I am trying to deploy a very simple app on Elastic Beanstalk with a small database backend. I try to install mysqlclient as part of the process outlined by AWS here. However, when I deploy my app, I get the following error from my Elastic Beanstalk logs as it tries to download the package:

                  Collecting mysqlclient
                    Using cached mysqlclient-2.0.1.tar.gz (87 kB)
                  
                  2020/08/21 20:30:16.419082 [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-bz45889a/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bz45889a/mysqlclient/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-1tyle8mv
                           cwd: /tmp/pip-install-bz45889a/mysqlclient/
                      Complete output (12 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-bz45889a/mysqlclient/setup.py", line 15, in <module>
                          metadata, options = get_config()
                        File "/tmp/pip-install-bz45889a/mysqlclient/setup_posix.py", line 65, in get_config
                          libs = mysql_config("libs")
                        File "/tmp/pip-install-bz45889a/mysqlclient/setup_posix.py", line 31, in mysql_config
                          raise OSError("{} not found".format(_mysql_config_path))
                      OSError: mysql_config not found
                  

                  问题

                  mysqlclient 是 AWS 推荐的驱动程序,用于使用 Flask 或 Django 连接到 RDS 中的 MySQL 数据库.如何使用 Elastic Beanstalk 安装它?

                  The mysqlclient is the AWS recommended driver to connect to a MySQL database in RDS using Flask or Django. How do I get it installed with Elastic Beanstalk?

                  背景

                  我尝试使用 (1) Elastic Beanstalk 环境的数据库或 (2) Elastic Beanstalk 环境定期部署的 RDS 实例来实现我的架构环境.在这种情况下,我们将使用选项 (1).

                  I've tried to implement my architecture with either (1) a database within the Elastic Beanstalk environment or (2) a regularly deployed RDS instance outside the Elastic Beanstalk environment. In this case, we're going with option (1).

                  我无法使用 apt-get 安装 mysql-server 或其他软件包作为 在这里建议 很容易,这就是为什么我希望这不会被标记为重复.我无权访问底层服务器.我尝试使用平台挂钩和 .ebextensions,但我 无法让它工作.在这篇文章中,我试图退后一步,看看是否还有其他途径.

                  I can't install mysql-server or other packages using apt-get as suggested here very easily, which is why I hope this isn't labeled as a duplicate. I don't have access to the underlying servers. I attempted to using platform hooks and .ebextensions, but I wasn't able to get that to work. In this post, I'm trying to step back and see if there is another avenue.

                  推荐答案

                  对于 Amazon linux 2,您应该能够使用 yum 安装它.因此,您可以在 .ebextensions 中有一个名为的文件,例如01_packages.config 内容:

                  For Amazon linux 2 you should be able to install it with yum. Thus, you can have in your .ebextensions a file called, e.g. 01_packages.config with the content:

                  packages: 
                      yum:
                          MySQL-python: []
                  

                  如果您需要更多 yum 依赖项,您可以添加更多.

                  You can add further yum dependencies if you require more.

                  这篇关于我如何解决“OSError: mysql_config not found"?Elastic Beanstalk 部署期间出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:SQL Server - EBS 存储设计 下一篇:参数组更改未反映在 Aurora Serverless 数据库集群上

                  相关文章

                  最新文章

                    <tfoot id='dznQQ'></tfoot>
                      <bdo id='dznQQ'></bdo><ul id='dznQQ'></ul>

                      <i id='dznQQ'><tr id='dznQQ'><dt id='dznQQ'><q id='dznQQ'><span id='dznQQ'><b id='dznQQ'><form id='dznQQ'><ins id='dznQQ'></ins><ul id='dznQQ'></ul><sub id='dznQQ'></sub></form><legend id='dznQQ'></legend><bdo id='dznQQ'><pre id='dznQQ'><center id='dznQQ'></center></pre></bdo></b><th id='dznQQ'></th></span></q></dt></tr></i><div id='dznQQ'><tfoot id='dznQQ'></tfoot><dl id='dznQQ'><fieldset id='dznQQ'></fieldset></dl></div>
                      <legend id='dznQQ'><style id='dznQQ'><dir id='dznQQ'><q id='dznQQ'></q></dir></style></legend>

                      <small id='dznQQ'></small><noframes id='dznQQ'>