经过一段时间后,当尝试分析Sylius插件代码时,检查器开始永久性地失败,并出现下一个错误:
- 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.它找不到任何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-gd和php7.4的唯一方法是提供编译选项。
UPD2:请看下面Sam Dark的回答
谢谢
发布于 2021-01-31 06:54:48
您需要在编译选项中指定GD标志:
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'发布于 2020-05-07 15:20:44
您需要添加ondrej/php仓库,更新包列表,然后安装php7.4-gd
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php7.4-gdhttps://stackoverflow.com/questions/61645148
复制相似问题