您的位置:首页 > 产品设计 > UI/UE

如何处理php服务器端requires ext-gd 报错?

2016-03-23 00:00 155 查看
摘要: 今天在安装Laravel Debugbar 安装包的过程中出现了requires ext-gd * -> the requested PHP extension gd is

missing from your system.如下错误,谷歌了下,终于找到了解决的方法

今天在安装Laravel Debugbar 安装包的过程中出现了requires ext-gd * -> the requested PHP extension gd is missing from your system.的错误,谷歌了下,终于找到了解决的方法。

安装报错:



解决方法:

该错误很明显,缺少GD库,所以我们需要通过命令来安装。如果你的服务器是Ubuntu,可以应用以下命令安装GD:

(if you are on a Debian based server (such as Ubuntu) you can run the following command:)

apt-get install php5-gd


然后找到自己的服务器安装路径重启:
(1)Apache服务器重启
/etc/init.d/apache2 restart


(2)Nginx服务器重启方式
sudo service php5-fpm restart   // 重启php
sudo service nginx restart      // 重启nginx

This will restart your server and enable GD in PHP.

通过 phpinfo() 方法就可以查看安装信息:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  php ext-gd laravel gd2