Unable to locate package php7.3-gd

妖精的绣舞 提交于 2020-02-22 08:09:47

问题


I get the error from my cakephp 2.x project:

The PHP GD extension is required, but is not installed.

I use php7.3 with apache on debian

I search and find

apt-get install php7.3-gd

I tried this but i only get following error:

E: Unable to locate package php7.3-gd
E: Couldn't find any package by glob 'php7.3-gd'
E: Couldn't find any package by regex 'php7.3-gd'

I searched again, but didnt find a soulution for this problem only for ubunto and nothing else worked. I hope someone could help me with this problem.


回答1:


It looks like you do not have the appropriate repo added. Try :

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3-gd



回答2:


@Will's answer did not work for me, I then replace the first command from sudo add-apt-repository ppa:ondrej/php to sudo apt-add-repository ppa:ondrej/php and it works for me. So finally I run:

sudo apt-add-repository ppa:ondrej/php    
sudo apt-get update
sudo apt-get install -y php7.3-gd


来源:https://stackoverflow.com/questions/57389375/unable-to-locate-package-php7-3-gd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!