1. <small id='PV1jR'></small><noframes id='PV1jR'>

        <tfoot id='PV1jR'></tfoot>

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

        AWS Elastic Beanstalk 中的 mysqlclient 安装错误

        时间:2023-10-26
          <tbody id='5u4BO'></tbody>
        • <i id='5u4BO'><tr id='5u4BO'><dt id='5u4BO'><q id='5u4BO'><span id='5u4BO'><b id='5u4BO'><form id='5u4BO'><ins id='5u4BO'></ins><ul id='5u4BO'></ul><sub id='5u4BO'></sub></form><legend id='5u4BO'></legend><bdo id='5u4BO'><pre id='5u4BO'><center id='5u4BO'></center></pre></bdo></b><th id='5u4BO'></th></span></q></dt></tr></i><div id='5u4BO'><tfoot id='5u4BO'></tfoot><dl id='5u4BO'><fieldset id='5u4BO'></fieldset></dl></div>
          <tfoot id='5u4BO'></tfoot>

        • <small id='5u4BO'></small><noframes id='5u4BO'>

          <legend id='5u4BO'><style id='5u4BO'><dir id='5u4BO'><q id='5u4BO'></q></dir></style></legend>

              <bdo id='5u4BO'></bdo><ul id='5u4BO'></ul>

                  本文介绍了AWS Elastic Beanstalk 中的 mysqlclient 安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在 AWS Elastic Beanstalk 上部署带有 mysql 应用程序的 django,因此需要 mysqlclient 库.mysqlclient 需要安装 python3-develmysql-devel 包,所以我有它的自定义配置文件 01_packages.config:

                  I am deploying a django with mysql app on AWS Elastic Beanstalk, so mysqlclient library is needed. mysqlclient needs python3-devel and mysql-devel package to be installed, so I have the custom config file for it 01_packages.config:

                  packages: 
                    yum:
                      python3-devel: []
                      mysql-devel: []
                  

                  部署失败,日志文件 /var/log/cfn-init.log(在 Beanstalk 日志中提到)显示错误:

                  Deployment fails and the log file /var/log/cfn-init.log (mentioned in Beanstalk logs) shows the error:

                  2020-05-31 02:17:37,565 [INFO] -----------------------Starting build-----------------------
                  2020-05-31 02:17:37,572 [INFO] Running configSets: Infra-EmbeddedPreBuild
                  2020-05-31 02:17:37,575 [INFO] Running configSet Infra-EmbeddedPreBuild
                  2020-05-31 02:17:37,579 [INFO] Running config prebuild_0_doyouknow
                  2020-05-31 02:17:41,831 [ERROR] mysql-devel is not available to be installed
                  2020-05-31 02:17:41,831 [ERROR] Error encountered during build of prebuild_0_doyouknow: Yum does no
                  t have mysql-devel available for installation
                  Traceback (most recent call last):
                    File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 542, in run_config
                      CloudFormationCarpenter(config, self._auth_config).build(worklog)
                    File "/usr/lib/python2.7/site-packages/cfnbootstrap/construction.py", line 229, in build
                      changes['packages'][manager] = CloudFormationCarpenter._packageTools[manager]().apply(packages,
                   self._auth_config)
                    File "/usr/lib/python2.7/site-packages/cfnbootstrap/rpm_tools.py", line 74, in apply
                      raise ToolError("Yum does not have %s available for installation" % pkg_spec)
                  ToolError: Yum does not have mysql-devel available for installation
                  2020-05-31 02:17:41,834 [ERROR] -----------------------BUILD FAILED!------------------------
                  

                  但是,我尝试通过 yum install mysql-devel 在我的 Ec2 实例上手动安装它并成功安装.

                  However, I tried to install it manually on my Ec2 instance through yum install mysql-devel and it is installed successfully.

                  我的python版本是3.7,我的requirements.txt文件内容是:

                  My python version is 3.7 and my requirements.txt file content is:

                  asgiref==3.2.7
                  Django==3.0.5
                  django-cors-headers==3.2.1
                  django-dotenv==1.4.2
                  django-social-share==1.4.0
                  mysqlclient==1.4.6
                  numpy==1.18.4
                  pandas==1.0.3
                  Pillow==7.1.1
                  python-dateutil==2.8.1
                  pytz==2019.3
                  six==1.14.0
                  sqlparse==0.3.1
                  xlrd==1.2.0
                  

                  推荐答案

                  已解决! 我已经将 mysql-devel 替换为 mariadb-devel它运行成功,然后我就可以安装 mysqlcient 库.

                  Solved! I have replaced mysql-devel with mariadb-devel and it worked successfully, then I was able to install mysqlcient library.

                  我的新01_packages.config:

                  packages: 
                    yum:
                      python3-devel: []
                      mariadb-devel: []
                  

                  我不知道它的根本原因,但我这样做是因为我注意到通过 yum install mysql-devel 手动安装 mysql-devel 是实际安装mariadb-devel !

                  I don't know the root cause of it, but I did so as I noticed that the manual installation of mysql-devel through yum install mysql-devel is actually installing mariadb-devel !

                  这是我的 ec2 实例发布详细信息.也许是因为新的 Amazon Linux Release 2.

                  Here is my ec2 instance release details. Maybe it is because of the new Amazon Linux Release 2.

                  $ cat /etc/*-release*
                  NAME="Amazon Linux"
                  VERSION="2"
                  ID="amzn"
                  ID_LIKE="centos rhel fedora"
                  VERSION_ID="2"
                  PRETTY_NAME="Amazon Linux 2"
                  ANSI_COLOR="0;33"
                  CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
                  HOME_URL="https://amazonlinux.com/"
                  Amazon Linux release 2 (Karoo)
                  cpe:2.3:o:amazon:amazon_linux:2
                  

                  这篇关于AWS Elastic Beanstalk 中的 mysqlclient 安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      <tbody id='997vm'></tbody>

                  1. <small id='997vm'></small><noframes id='997vm'>

                        <bdo id='997vm'></bdo><ul id='997vm'></ul>
                        <legend id='997vm'><style id='997vm'><dir id='997vm'><q id='997vm'></q></dir></style></legend>

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