AWS Beanstalk deployement issue

0 votes

I'm a newbie with AWS. I've been attempting without luck to launch a web application on beanstalk. I connected to my Github using CodePiple, however the deploy operation failed. I looked in the beanstalk's log file, and this is what I found:

Collecting flask_mysqldb==1.0.1
  Using cached Flask-MySQLdb-1.0.1.tar.gz (4.3 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting Flask_SQLAlchemy==2.5.1
  Using cached Flask_SQLAlchemy-2.5.1-py2.py3-none-any.whl (17 kB)
Collecting Pillow==9.3.0
  Using cached Pillow-9.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
Collecting mysql==0.0.3
  Using cached mysql-0.0.3-py3-none-any.whl (1.2 kB)
Collecting mysqlclient==2.1.1
  Using cached mysqlclient-2.1.1.tar.gz (88 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

2022/12/15 22:45:50.073862 [INFO]   error: subprocess-exited-with-error
  
  × 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-jkf8sex7/mysqlclient_652b2c543c58458181f58f3950c00b59/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/tmp/pip-install-jkf8sex7/mysqlclient_652b2c543c58458181f58f3950c00b59/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/tmp/pip-install-jkf8sex7/mysqlclient_652b2c543c58458181f58f3950c00b59/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]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

2022/12/15 22:45:50.073898 [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: subprocess-exited-with-error
  
  × 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-jkf8sex7/mysqlclient_652b2c543c58458181f58f3950c00b59/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/tmp/pip-install-jkf8sex7/mysqlclient_652b2c543c58458181f58f3950c00b59/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/tmp/pip-install-jkf8sex7/mysqlclient_652b2c543c58458181f58f3950c00b59/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]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

I have this on my requirements.txt

aiohttp==3.8.3
Django==4.1.4
Flask==2.0.2
Flask_Login==0.6.0
flask_mysqldb==1.0.1
Flask_SQLAlchemy==2.5.1
Pillow==9.3.0
mysql==0.0.3
mysqlclient==2.1.1
Werkzeug==2.0.0
jinja2~=3.0.3

I'm not sure on how to solve this problem.

Dec 16, 2022 in AWS by Ashwini
• 5,430 points

edited 6 days ago 17 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP