0

I'm trying to configure PHP7 and I'm getting this error even though ./configure --help says that the variable name is --with-jpeg-dir. What am I missing? Here is my command:

./configure --with-apxs2=/usr/bin/apxs --with-mysqli --with-imap --with-imap-ssl --with-kerberos -- with-pdo-mysql --with-openssl --with-curl --enable-pcntl libdir=lib64 --with-zlib --enable-zip --enable-mbstring --enable-intl --with-readline --with-xsl --with-gd --with-jpeg-dir=/usr/lib64 --with-png-dir=/usr/lib64 --with-gmp --enable-bcmath --enable-opcache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d

The exact error response is: configure: error: invalid variable name: '--with-jpeg-dir'

Thelonias
  • 103
  • 4
  • You may have to run yum install libjpeg-devel first as per http://stackoverflow.com/questions/29532075/apache-configure-gives-error-invalid-variable-name-with-ssl – JayMcTee Jan 05 '16 at 16:04
  • I've already got the latest version of libjpeg-devel installed – Thelonias Jan 05 '16 at 16:08
  • Is it an exact copy-paste of the configure command? There seems to be a few holes: -- with-pdo-mysql with a space, libdir=lib64 without -- – JayMcTee Jan 05 '16 at 16:10
  • Looks like that was the issue. Thanks, I didn't realize I had those errors in that command string. Now I get to try and figure out why I'm getting: "Cannot find imap library (libc-client.a)". Add that as an answer (or I can just delete the post since it was just a dumb mistake on my part) – Thelonias Jan 05 '16 at 16:17

1 Answers1

1

There seems to be some typo's in your configure:

-- with-pdo-mysql with a space, libdir=lib64 without double hyphen --

This should work:

./configure --with-apxs2=/usr/bin/apxs --with-mysqli --with-imap --with-imap-ssl --with-kerberos --with-pdo-mysql --with-openssl --with-curl --enable-pcntl --libdir=lib64 --with-zlib --enable-zip --enable-mbstring --enable-intl --with-readline --with-xsl --with-gd --with-jpeg-dir=/usr/lib64 --with-png-dir=/usr/lib64 --with-gmp --enable-bcmath --enable-opcache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d

Also make sure all the packages have been installed and those paths are in fact correct.

JayMcTee
  • 3,923
  • 1
  • 13
  • 22