今天在安装Laravel Debugbar 安装包的过程当中出现了requires ext-gd * -> the requested PHP extension gd is missing from your system.的错误,谷歌了下,终于找到了解决的方法。php
该错误很明显,缺乏GD库,因此咱们须要经过命令来安装。若是你的服务器是Ubuntu,能够应用如下命令安装GD:
nginx
(if you are on a Debian based server (such as Ubuntu) you can run the following command:)apache
apt-get install php5-gd
而后找到本身的服务器安装路径重启:服务器
(1)Apache服务器重启ui
/etc/init.d/apache2 restart
(2)Nginx服务器重启方式spa
sudo service php5-fpm restart // 重启php
sudo service nginx restart // 重启nginx
This will restart your server and enable GD in PHP.rest
经过 phpinfo() 方法就能够查看安装信息:code