Fix php5 Unable to locate gmp.h

This commit is contained in:
bestlong 2018-05-27 20:01:29 +08:00
parent 9250326664
commit 402383e7b7
1 changed files with 4 additions and 1 deletions

View File

@ -209,6 +209,9 @@ ARG INSTALL_GMP=false
RUN if [ ${INSTALL_GMP} = true ]; then \
# Install the GMP extension
apt-get install -y libgmp-dev && \
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
;fi && \
docker-php-ext-install gmp \
;fi