2017-04-19 19 views
1

CircleCIにImageMagickをインストールする方法を知っている人はいませんか?PHP 7、Imagemagick and CircleCI

ImageMagickを除くすべてが動作します。ここに私が得るエラーメッセージがあります。ここで

Intervention\Image\Exception\NotSupportedException: 
ImageMagick module not available with this PHP installation. 

あなたcircle.ymlに次のように使用する必要が私のcircle.yml

machine: 
    pre: 
    - sudo apt-get update; USE_PRECOMPILE=true sudo -E circleci-install php 7.0.4 
    php: 
    version: 7.0.4 
    timezone: America/Los_Angeles 

    services: 
    - mysql 

    environment: 
     APP_ENV: testing 
     APP_KEY: randomrandomrandomrandomrandomra 

dependencies: 
    pre: 
    - sudo aptitude -y install imagemagick 
    - sudo apt-add-repository -y ppa:ondrej/php 
    - sudo apt-get -y update 
    - sudo apt-get -y install php-imagick 

    override: 
    - composer install --prefer-dist --no-interaction 

    post: 
    - mv .env.circleci .env 

test: 
    override: 
    - vendor/bin/phpunit 

答えて

3

imagickはPHP 7で作業を得ることです:

machine: 
    php: 
    version: 7.1.3 

dependencies: 
    pre: 
    - printf "\n" | pecl install -f imagick 
    - echo "extension = imagick.so" >> /opt/circleci/php/$(phpenv global)/etc/php.ini 

・ホープ、このことができます!