Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
474 views
in Technique[技术] by (71.8m points)

php - install php70-gd on ubuntu

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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
# or
sudo apt-get install php7.3-gd
# or
sudo apt-get install php7.4-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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...