首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在scrutinizer ci配置中为php7.4安装ext-gd?

如何在scrutinizer ci配置中为php7.4安装ext-gd?
EN

Stack Overflow用户
提问于 2020-05-07 04:50:31
回答 2查看 1.5K关注 0票数 1

经过一段时间后,当尝试分析Sylius插件代码时,检查器开始永久性地失败,并出现下一个错误:

代码语言:javascript
复制
- sylius/sylius v1.7.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- sylius/sylius v1.7.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- sylius/sylius v1.7.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- sylius/sylius v1.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.

示例:https://scrutinizer-ci.com/g/Setono/SyliusPronavicPlugin/inspections/c6ead08f-5fad-405e-b557-9d0adf987c0c

它找不到任何php7.4-gd / php7.0-gd / php-gd包(我已经尝试了所有的变体,因为我不知道在那里使用的是哪个Ubuntu ),而且如果我试图指定编译器选项compile_options: '--enable-gd',它也会失败(因为它看起来像是重写了一些文档中没有指定的默认选项,但需要这些选项才能成功运行检查器,请参阅https://scrutinizer-ci.com/g/Setono/SyliusPronavicPlugin/inspections/e198ca2c-125d-4d57-b8ef-2314a62c5ecc)。

有没有人知道如何配置检查器来安装php7.4的ext-gd?官方文档不提供信息:(

更新:看起来检查器在旧的Ubuntu14.04 (Scrutinizer old Ubuntu 14.04)下工作,并且没有针对它的php7.4包(谷歌installing php7.4-gd at ubuntu 14.04不会给你正确的结果,所以使用ext-gdphp7.4的唯一方法是提供编译选项。

UPD2:请看下面Sam Dark的回答

谢谢

EN

回答 2

Stack Overflow用户

发布于 2021-01-31 06:54:48

您需要在编译选项中指定GD标志:

代码语言:javascript
复制
environment:
        php:
            version: 7.4.14
            compile_options: '--with-config-file-path=/home/scrutinizer/.phpenv/versions/7.4.14/etc --with-config-file-scan-dir=/home/scrutinizer/.phpenv/versions/7.4.14/etc/conf.d --prefix=/home/scrutinizer/.phpenv/versions/7.4.14 --libexecdir=/home/scrutinizer/.phpenv/versions/7.4.14/libexec --enable-intl --with-openssl --enable-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-exif --with-libzip --with-zlib --with-zlib-dir=/usr --with-sodium --with-pdo-sqlite --enable-soap --enable-xmlreader --with-xsl --enable-ftp --with-tidy --with-xmlrpc --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-shmop --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-pcntl --with-readline --enable-mbstring --with-curl --with-pgsql --with-pdo-pgsql --with-gettext --enable-sockets --with-bz2 --enable-bcmath --enable-calendar --with-libdir=lib --enable-fpm --enable-maintainer-zts --with-gmp --with-kerberos --with-imap --with-imap-ssl --with-apxs2=/usr/bin/apxs --with-ldap --with-pear=/home/scrutinizer/.phpenv/versions/7.4.14/pear'             compile_options: '--with-config-file-path=/home/scrutinizer/.phpenv/versions/7.4.14/etc --with-config-file-scan-dir=/home/scrutinizer/.phpenv/versions/7.4.14/etc/conf.d --prefix=/home/scrutinizer/.phpenv/versions/7.4.14 --libexecdir=/home/scrutinizer/.phpenv/versions/7.4.14/libexec --enable-intl --with-openssl --with-gd --enable-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-exif --with-libzip --with-zlib --with-zlib-dir=/usr --with-sodium --with-pdo-sqlite --enable-soap --enable-xmlreader --with-xsl --enable-ftp --with-tidy --with-xmlrpc --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-shmop --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-pcntl --with-readline --enable-mbstring --with-curl --with-pgsql --with-pdo-pgsql --with-gettext --enable-sockets --with-bz2 --enable-bcmath --enable-calendar --with-libdir=lib --enable-fpm --enable-maintainer-zts --with-gmp --with-kerberos --with-imap --with-imap-ssl --with-apxs2=/usr/bin/apxs --with-ldap --with-pear=/home/scrutinizer/.phpenv/versions/7.4.14/pear'
票数 1
EN

Stack Overflow用户

发布于 2020-05-07 15:20:44

您需要添加ondrej/php仓库,更新包列表,然后安装php7.4-gd

代码语言:javascript
复制
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php7.4-gd
票数 -2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61645148

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档