Skip to content

Commit cc20ac2

Browse files
authored
Merge pull request laradock#1573 from bestlong/fix-php5-gmp
Fix php5 Unable to locate gmp.h
2 parents 9250326 + 402383e commit cc20ac2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

php-fpm/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,10 @@ ARG INSTALL_GMP=false
208208

209209
RUN if [ ${INSTALL_GMP} = true ]; then \
210210
# Install the GMP extension
211-
apt-get install -y libgmp-dev && \
211+
apt-get install -y libgmp-dev && \
212+
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
213+
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \
214+
;fi && \
212215
docker-php-ext-install gmp \
213216
;fi
214217

0 commit comments

Comments
 (0)