# cant install dependencies for mysql and flask

**URL:** <https://forum.ansible.com/t/cant-install-dependencies-for-mysql-and-flask/30128>\
**Category:** Ansible Project\
**Created:** [April 16, 2019, 9:13pm UTC](https://forum.ansible.com/t/cant-install-dependencies-for-mysql-and-flask/30128 "2019-04-16T21:13:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AQ1](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AQ1](https://forum.ansible.com/u/AQ1)\
**Post date:** [April 16, 2019, 9:13pm UTC](https://forum.ansible.com/t/cant-install-dependencies-for-mysql-and-flask/30128/1 "2019-04-16T21:13:47Z")

</div>

[test@ip-172-31-1-143 ~]$ ansible-playbook /home/test/AQ-Project2/playbook.yml -i /home/test/AQ-Project2/inventory.txt

PLAY [Deploy a web application] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
ok: [db\_and\_web\_server]

TASK [Install dependencies] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
failed: [db\_and\_web\_server] (item=[u’python’, u’python-setuptools’, u’python-dev’, u’build-essential’, u’python-pip’, u’python-mysqldb’]) =\> {“changed”: false, “failed”: true, “item”: [“python”, “python-setuptools”, “python-dev”, “build-essential”, “python-pip”, “python-mysqldb”], “msg”: “No package matching ‘python-dev’ found available, installed or updated”, “rc”: 126, “results”: [“python-2.7.14-58.amzn2.0.4.x86\_64 providing python is already installed”, “python2-setuptools-38.4.0-3.amzn2.0.6.noarch providing python-setuptools is already installed”, “No package matching ‘python-dev’ found available, installed or updated”]}  
to retry, use: --limit @/home/test/Anas-Project2/playbook.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
db\_and\_web\_server : ok=1 changed=0 unreachable=0 failed=1

---

<div class="post-metadata">

**Author:** ![Sascha\_Andres](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sascha_andres/32/3742_2.png) [@Sascha\_Andres](https://forum.ansible.com/u/Sascha_Andres)\
**Post date:** [April 17, 2019, 3:55am UTC](https://forum.ansible.com/t/cant-install-dependencies-for-mysql-and-flask/30128/2 "2019-04-17T03:55:56Z")

</div>

Hi,

depending on your distribution the packages might have a different name. Have you tried installing python-dev manually. It might be named python2-dev.

Kind regards,  
Sascha

---

<div class="post-metadata">

**Author:** ![AQ1](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@AQ1](https://forum.ansible.com/u/AQ1)\
**Post date:** [April 17, 2019, 9:32pm UTC](https://forum.ansible.com/t/cant-install-dependencies-for-mysql-and-flask/30128/3 "2019-04-17T21:32:50Z")

</div>

still doesn’t work:

[test@ip-172-31-1-143 ~]$ ansible webservers -m yum -a ‘name=python2-dev state=present’ -u test --become --ask-become-pass  
SUDO password:  
172.31.13.61 | FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“msg”: “No package matching ‘python2-dev’ found available, installed or updated”,  
“rc”: 126,  
“results”: [  
“No package matching ‘python2-dev’ found available, installed or updated”  
]  
}

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [April 17, 2019, 10:16pm UTC](https://forum.ansible.com/t/cant-install-dependencies-for-mysql-and-flask/30128/4 "2019-04-17T22:16:40Z")

</div>

You don't make it particularly easy for to help you by not providing a  
playbook, or details about the host you're trying to manage.  
But, there are a few bits of information buried in that error you posted.  
Most importantly the string 'amzn' in one of the the package names  
suggests that you're using an AWS AMI.  
I think in that universe the package you're after is called "python-devel".

Dick
