am trying to install Install PHP 7.1 on CentOS using docker file, but looks like some error is always stopping,
Dockerfile:
FROM centos:7
# Install some must-haves
RUN yum -y install vim wget sendmail
RUN yum -y install libtool make automake autoconf nasm libpng-static
RUN yum -y install git
RUN git --version
# Install PHP 7.1 on CentOS
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN yum update -y
RUN yum install yum-utils
RUN yum-config-manager --enable remi-php71
RUN yum -y install php71w php71w-bcmath php71w-cli php71w-common php71w-curl php71w-fpm php71w-gd php71w-ldap php71w-imap php71w-intl php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-opcache php71w-pdo php71w-pear php71w-pecl-apcu php71w-pecl-imagick php71w-pgsql php71w-process php71w-pspell php71w-recode php71w-soap php71w-tidy php71w-xml
RUN php -v
Error:
--> Running transaction check
---> Package libX11-common.noarch 0:1.6.7-3.el7_9 will be installed
---> Package libxcb.x86_64 0:1.13-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.13-1.el7.x86_64
---> Package php71w-pecl-imagick.x86_64 0:3.4.3-1.w7 will be installed
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php71w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php71w-pecl-imagick-3.4.3-1.w7.x86_64
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
---> Package php71w-pecl-imagick.x86_64 0:3.4.3-1.w7 will be installed
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php71w-pecl-imagick-3.4.3-1.w7.x86_64
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php71w-pecl-imagick-3.4.3-1.w7.x86_64
--> Finished Dependency Resolution
Error: Package: php71w-pecl-imagick-3.4.3-1.w7.x86_64 (webtatic)
Requires: libMagickWand.so.5()(64bit)
Error: Package: php71w-pecl-imagick-3.4.3-1.w7.x86_64 (webtatic)
Requires: libMagickCore.so.5()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
ERROR: Service 'laravel-env' failed to build : The command '/bin/sh -c yum -y install php71w php71w-bcmath php71w-cli php71w-common php71w-curl php71w-fpm php71w-gd php71w-ldap php71w-imap php71w-intl php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-opcache php71w-pdo php71w-pear php71w-pecl-apcu php71w-pecl-imagick php71w-pgsql php71w-process php71w-pspell php71w-recode php71w-soap php71w-tidy php71w-xml' returned a non-zero code: 1
any idea on whats going on and what went wrong? Am i missing any configurations in dockerFile?
You are trying to install php 7.1 from "webtatic" (php71w* packages)
This repository is dead, unmaintained (last change in 2019), and broken for recent changes in CentOS, such as the IMageMagick rebase.
To properly install PHP from "remi" repository, please follow the wizard instructions
so, something like
Notice: you don't need both "php" (mod_php for apache) and "php-fpm" (FPM service for any web server)
NOTICE PHP 7.1 have reach its end of life in December 2019, and even if "remi" repository provided some minimal security fixes, I heartily recommend updating to a supported version.