如何处理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.的错误,谷歌了下,终于找到了解决的方法。
![](http://static.oschina.net/uploads/space/2016/0323/150241_kmBQ_2557944.png)
(if you are on a Debian based server (such as Ubuntu) you can run the following command:)
然后找到自己的服务器安装路径重启:
(1)Apache服务器重启
(2)Nginx服务器重启方式
This will restart your server and enable GD in PHP.
通过 phpinfo() 方法就可以查看安装信息:
missing from your system.如下错误,谷歌了下,终于找到了解决的方法
今天在安装Laravel Debugbar 安装包的过程中出现了requires ext-gd * -> the requested PHP extension gd is missing from your system.的错误,谷歌了下,终于找到了解决的方法。
安装报错:
![](http://static.oschina.net/uploads/space/2016/0323/150241_kmBQ_2557944.png)
解决方法:
该错误很明显,缺少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() 方法就可以查看安装信息:
![](http://static.oschina.net/uploads/space/2016/0323/150841_cfzk_2557944.png)
相关文章推荐
- 一个关于if else容易迷惑的问题
- PHP5.2.*防止Hash冲突拒绝服务攻击的Patch
- 深入理解PHP之匿名函数
- JSP/PHP基于Ajax的分页功能实现
- 关于PHP通过PDO用中文条件查询MySQL的问题。
- 什么是设计模式
- PHP数据库长连接mysql_pconnect的细节
- Php Installing An Expansion
- workerman结合laravel开发在线聊天应用的示例代码
- 简单对比分析Ruby on Rails 和 Laravel
- PHP+Apache在Windows 9x下的安装和配置
- IIS 6 的 PHP 最佳配置方法
- 安装Apache和PHP的一些补充
- Linux Apache+MySQL+PHP
- 建立Apache+PHP+MySQL数据库驱动的动态网站
- PHP 5.3.0 安装分析心得
- apache 环境下 php 的配置注意事项
- ASP.NET、ASP、PHP、JSP之间有什么区别?
- PHP VBS JS 函数 对照表