[英]CentOS: Enabling GD Support in PHP Installation
我如何在 CentOS 安装中启用 GD 支持?
The thing that did the trick for me eventually was:最终对我有用的事情是:
yum install gd gd-devel php-gd
and then restart apache:然后重启apache:
service httpd restart
sudo yum install php-gd
sudo yum install php-gd
简单了With CentOS 6.5+ and PHP 5.5:使用 CentOS 6.5+ 和 PHP 5.5:
yum install php55u-gd
service httpd restart
If you get an error like: cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0
, it could be because you don't have a swap file.如果您收到如下错误:
cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0
,这可能是因为您没有交换文件。 I suggest you take a look at the tutorial mentioned in this answer: https://stackoverflow.com/a/20275282/828366我建议你看看这个答案中提到的教程: https : //stackoverflow.com/a/20275282/828366
Tutorial: https://www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6教程: https : //www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6
CentOs 6.5+ & PHP 5.6: CentOs 6.5+ 和 PHP 5.6:
sudo yum install php56-gd
service httpd restart
Put the command把命令
yum install php-gd
and restart the server (httpd, nginx, etc)并重新启动服务器(httpd、nginx 等)
service httpd restart
对于 CentOS 或 EC2 Linux AMI 上的 PHP7:
sudo yum install php70-gd
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.