install php70-gd on ubuntu

自闭症网瘾萝莉.ら 提交于 2019-11-26 20:23:14

问题


Recently the new php7 has been released. However, when I am trying to install the gd package, the library can not be found.

I have tried through

sudo apt-get install php70-gd 

and

sudo apt-get install php70-php-gd

Does anybody have an idea if gd is available for php 7?


回答1:


PHP7 packages for Ubuntu including php7.0-gd can be installed via PPA for PHP by Ondřej Surý:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

Next, install the desired version:

sudo apt-get install php7.0-gd
# or
sudo apt-get install php7.1-gd
# or
sudo apt-get install php7.2-gd

EDIT:

As MacroMan stated, under Ubuntu 16.04 you don't need to add the repository any more. Simply issuing sudo apt-get install php7.0-gd works.




回答2:


just try

sudo apt-get install php7.0-gd 

i got it working that way. Greetings.




回答3:


In 2018 there is an aliase package:

sudo apt-get install php-gd

Use this to retrieve the last version.




回答4:


my php version is 7.1

sudo apt-get install php7.1-gd

this command is work for me




回答5:


For Ubuntu 16.04.4 LTS

this is the command:

sudo apt-get install php7.0-gd



来源:https://stackoverflow.com/questions/34367917/install-php70-gd-on-ubuntu

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