CentOS:在 PHP 安装中启用 GD 支持
如何在 CentOS 安装中启用 GD 支持?
How do I go about enabling GD Support in a CentOS Installation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何在 CentOS 安装中启用 GD 支持?
How do I go about enabling GD Support in a CentOS Installation?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
最终对我有用的是:
然后重新启动 apache:
The thing that did the trick for me eventually was:
and then restart apache:
sudo yum install php-gd
使用 CentOS 6.5+ 和 PHP 5.5:
如果出现如下错误:
cannot map Zero-fill Pages: Cannot allocate memory in Unknown on line 0
,可能是因为您没有交换文件。我建议您看一下此答案中提到的教程:https://stackoverflow.com/a/20275282/828366教程:https://www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6
With CentOS 6.5+ and PHP 5.5:
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. I suggest you take a look at the tutorial mentioned in this answer: https://stackoverflow.com/a/20275282/828366Tutorial: 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:
输入命令
并重新启动服务器(httpd、nginx等)
Put the command
and restart the server (httpd, nginx, etc)
对于 CentOS 或 EC2 Linux AMI 上的 PHP7:
For PHP7 on CentOS or EC2 Linux AMI: