沃梦达 / 编程问答 / php问题 / 正文

您的系统中缺少扩展 gd - laravel composer 更新

Extension gd is missing from your system - laravel composer Update(您的系统中缺少扩展 gd - laravel composer 更新)

本文介绍了您的系统中缺少扩展 gd - laravel composer 更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过 Composer 在 Laravel 项目中新安装了 Dompdf(composer 需要 barryvdh/laravel-dompdf).进入命令终端后回复以下错误.

I newly install Dompdf in Laravel Project via Composer (composer require barryvdh/laravel-dompdf). After enter the Command Terminal Reply Following Errors.

Problem 1
    - dompdf/dompdf v0.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
    - barryvdh/laravel-dompdf v0.7.0 requires dompdf/dompdf ^0.7 -> satisfiable by dompdf/dompdf[v0.7.0].
    - Installation request for barryvdh/laravel-dompdf ^0.7.0 -> satisfiable by barryvdh/laravel-dompdf[v0.7.0].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/5.6/cli/php.ini
    - /etc/php/5.6/cli/conf.d/10-opcache.ini
    - /etc/php/5.6/cli/conf.d/10-pdo.ini
    - /etc/php/5.6/cli/conf.d/15-xml.ini
    - /etc/php/5.6/cli/conf.d/20-calendar.ini
    - /etc/php/5.6/cli/conf.d/20-ctype.ini
    - /etc/php/5.6/cli/conf.d/20-dom.ini
    - /etc/php/5.6/cli/conf.d/20-exif.ini
    - /etc/php/5.6/cli/conf.d/20-fileinfo.ini
    - /etc/php/5.6/cli/conf.d/20-ftp.ini
    - /etc/php/5.6/cli/conf.d/20-gettext.ini
    - /etc/php/5.6/cli/conf.d/20-iconv.ini
    - /etc/php/5.6/cli/conf.d/20-json.ini
    - /etc/php/5.6/cli/conf.d/20-mbstring.ini
    - /etc/php/5.6/cli/conf.d/20-phar.ini
    - /etc/php/5.6/cli/conf.d/20-posix.ini
    - /etc/php/5.6/cli/conf.d/20-readline.ini
    - /etc/php/5.6/cli/conf.d/20-shmop.ini
    - /etc/php/5.6/cli/conf.d/20-simplexml.ini
    - /etc/php/5.6/cli/conf.d/20-sockets.ini
    - /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
    - /etc/php/5.6/cli/conf.d/20-sysvsem.ini
    - /etc/php/5.6/cli/conf.d/20-sysvshm.ini
    - /etc/php/5.6/cli/conf.d/20-tokenizer.ini
    - /etc/php/5.6/cli/conf.d/20-wddx.ini
    - /etc/php/5.6/cli/conf.d/20-xmlreader.ini
    - /etc/php/5.6/cli/conf.d/20-xmlwriter.ini
    - /etc/php/5.6/cli/conf.d/20-xsl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

如何解决这个错误

我已经使用以下评论安装了 GD.sudo apt-get install php5-gd 以及 Apache 服务器重新启动.我的 Laravel 版本是 5.3,Ubuntu 版本是 14.04

I already Installed GD using Following comment. sudo apt-get install php5-gd and also Apache Server Restarted. My Laravel Version is 5.3 and Ubuntu Version is 14.04

推荐答案

我已经安装了php7,我做了以下解决完全一样的错误

I have installed php7, I did the following to solve exactly the same error

sudo apt-get install php7.0-gd
sudo apt-get install php7.0-intl
sudo apt-get install php7.0-xsl

这篇关于您的系统中缺少扩展 gd - laravel composer 更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:您的系统中缺少扩展 gd - laravel composer 更新

基础教程推荐