我正在尝试配置 PHP7,尽管./configure --help
变量名称为,但还是出现此错误--with-jpeg-dir
。我遗漏了什么?这是我的命令:
./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
确切的错误响应是:
configure: error: invalid variable name: '--with-jpeg-dir'
答案1
您的配置中似乎有一些拼写错误:
-- with-pdo-mysql 带有空格,libdir=lib64 不带双连字符 --
这应该有效:
./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
还要确保所有软件包都已安装并且这些路径确实是正确的。