如何在ubuntu 21.04中下载php7.2-gd扩展?



我想在我当前的php项目(php版本是7.2.34)中安装gd扩展,因为我使用这个命令sudo apt-get install php7.2-gd,它抛出以下错误,当我运行php -m命令时,它没有显示在列表中,如何安装gd扩展请帮助我解决这个问题。

Error

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
php7.2-gd : Depends: libjpeg62-turbo (>= 1.3.1) but it is not installable
E: Unable to correct problems, you have held broken packages.

这个包依赖于libjpeg62-turbo,所以你需要先安装它

wget http://ftp.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.5.1-2_amd64.deb
sudo apt-get install ./libjpeg62-turbo_1.5.1-2_amd64.deb

之后,你可以很容易地安装你的包

sudo apt-get install php7.2-gd

相关内容

  • 没有找到相关文章

最新更新