doudaochu1699 2017-03-01 11:40
浏览 254

GD库扩展不适用于这个PHP安装linux mint

I'm having trouble using the library. When I try to upload an image using laravel 5.4, I get a NotSupportedException

NotSupportedException in Driver.php line 16: GD Library extension not available with this PHP installation.

even though GD is definitely installed.

$ php -i | grep -i --color gd
/etc/php/7.0/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD headers Version => 2.1.1
GD library Version => 2.1.1
gd.jpeg_ignore_warning => 0 => 0
GDM_XSERVER_LOCATION => local
GDMSESSION => cinnamon
$_SERVER['GDM_XSERVER_LOCATION'] => local
$_SERVER['GDMSESSION'] => cinnamon

I tried apt-get install --reinstall php7.0-gd && service apache2 restart but no success.then i tried to enable the library GD2 from php.ini file remove semicolon from ;extension=php_gd2.dll again i restart apache2 but still no success. please help me.any help would be appreciated.

  • 写回答

2条回答 默认 最新

  • dqvj51875 2017-03-17 16:55
    关注

    having the same problem here in my application.

    What i did installed php7.1. In my case used PPA

    sudo add-apt-repository ppa:ondrej/php sudo apt-get update (optional-I didnt) sudo apt-get remove php7.0 sudo apt-get install php7.1

    Restarted the apache server

    Also tried this help using this providers on the "image" Alias that they suggest. It totally crashed my application. Did the steps back and no it doesnt five me the error anymore.

    Im trying to run Laravel with voyager. Had some problems on the installation and making my server work had to install ubuntu Lamp and configure it exatcly to work with Laravel composer and all those shi%*ts need to make this work. All that simple propaganda bullshit. Hehehe

    But anyways, if you have some idea on how to make it work it would be great. 2 days researching already on the sollutions and not being able to solve it, but Laravel and Voyager are working, they just dont upload the photos.

    评论

报告相同问题?

悬赏问题

  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备