今天在安装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:)
立即学习“PHP免费学习笔记(深入)”;
apt-get install php5-gd<br />
然后找到自己的服务器安装路径重启:
(1)Apache服务器重启
/etc/init.d/apache2 restart<br />
(2)Nginx服务器重启方式
sudo service php5-fpm restart // 重启php<br />sudo service nginx restart // 重启nginx<br />
This will restart your server and enable GD in PHP.
通过 phpinfo() 方法就可以查看安装信息:
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号