php 在 ubuntu 上安装 php70-gd
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/34367917/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
install php70-gd on ubuntu
提问by apfz
Recently the new php7 has been released. However, when I am trying to install the gd package, the library can not be found.
最近新的php7已经发布。但是,当我尝试安装 gd 包时,找不到该库。
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?
有人知道 gd 是否可用于 php 7 吗?
回答by Limon Monte
PHP7 packages for Ubuntu including php7.0-gd
can be installed via PPA for PHP by Ond?ej Sury:
用于 Ubuntu 的 PHP7 软件包php7.0-gd
可以通过 Ond?ej Sury通过PPA for PHP安装:
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.
正如MacroMan 所说,在 Ubuntu 16.04 下,您不再需要添加存储库。简单发布sudo apt-get install php7.0-gd
作品。
回答by Emanuel
just try
你试一试
sudo apt-get install php7.0-gd
i got it working that way. Greetings.
我是这样工作的。你好。
回答by Tino Rüb
In 2018 there is an aliase package:
2018年有一个别名包:
sudo apt-get install php-gd
sudo apt-get install php-gd
Use this to retrieve the last version.
使用它来检索最新版本。
回答by Md. Noor-A-Alam Siddique
my php version is 7.1
我的 php 版本是 7.1
sudo apt-get install php7.1-gd
this command is work for me
这个命令对我有用
回答by Anoop Saini
For Ubuntu 16.04.4 LTS
对于 Ubuntu 16.04.4 LTS
this is the command:
这是命令:
sudo apt-get install php7.0-gd
sudo apt-get install php7.0-gd
回答by SHUBHAM SINGH
check php verison first using
首先使用检查php verison
php -v
It will give version number suppose your version is 7.0.1 then use this command to install GD Library
假设您的版本是 7.0.1,它将给出版本号,然后使用此命令安装 GD 库
sudo yum install php70-gd
OR use this command depending upon server specification
或根据服务器规格使用此命令
sudo apt-get install php7.0-gd