P粉7774587872023-08-29 13:37:05
Answer your own question. Later I asked a similar questionAWS Elastic Beanstalk RDS MacOS mysqlclient not workingand got help.
The answer is indeed the packages.config file, which is required to install via yum (please refer to the link above). There's something else going wrong in my code, but I'm getting the same error as above, even though packages.config is set correctly. I found this issue because I tried setting it back to a SQLite database and uploading to Elastic Beanstalk, but it didn't work. (Sorry, I can't remember what error I got, I was nervous, I think it was a "111: Connection refused" error.)
The way I got things working was to delete all the config files and start over with a regular finished project and follow the tutorial (like I did before): https://docs.aws .amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-rds.html#python-rds-connect
From there, I added a packages.config file in my .ebextensions folder with the following code...
packages: yum: python3-devel: [] mariadb-devel: []
...as mentioned in the other question I linked above, and here: mysqlclient installation error in AWS Elastic Beanstalk
I also need gunicorn and a Procfile, but I've solved this problem before, but if you're here because of issues with Elastic Beanstalk and RDS, it's worth mentioning as well.
I also don't understand if I can use yum in the packages.config file if I don't have yum on my computer, especially since I'm using MacOS and using yum on MacOS is not common. This question is answered in another question I linked above, and the answer is that you don't need to install yum on your machine in this case because yum is used by Elastic Beanstalk's Amazon Linux 2 server in this case of.