geerlingguy / ansible-role-php

Ansible Role - PHP
https://galaxy.ansible.com/geerlingguy/php/
MIT License
492 stars 442 forks source link

Debian-10, php7.4 issue, No package matching 'php7.4-common' is available" #338

Closed dmiryan closed 3 years ago

dmiryan commented 3 years ago

Hi php7.4 installation issue on Debian-10

if I change, php version to "7.4" in: /root/.ansible/roles/geerlingguy.php/vars/Debian-10.yml

I get following error TASK [geerlingguy.php : Ensure PHP packages are installed.] ** fatal: [dsdev2-test]: FAILED! => {"changed": false, "msg": "No package matching 'php7.4-common' is available"}

gotmax23 commented 3 years ago

Your problem is that you set php_default_version_debian to a version that is not available in the Debian 10 repositories.

If you'd like to be able to switch PHP versions easily, or use a version that's not available in system packages: You can use the geerlingguy.php-versions role to more easily switch between major PHP versions (e.g. 5.6, 7.1, 7.2).

- README

Also, you should set variables directly in the playbook, host_vars, group_vars, or your inventory. The way you did it is suboptimal for a couple reasons. For example, if you update the role (which you should do!), you will lose your changes.

Good Luck, Maxwell 😀

gotmax23 commented 3 years ago

@dmiryan,

As I solved your issue, can you please close it to avoid issue clutter for geerlingguy?

Thanks, Maxwell