我的Configure Command
没有说任何关于jpg,也没有gif / png,但是我可以在phpinfo()
的输出中看到gif/png support
。
我使用--with-gd
构build了PHP,但是只有GIF Support
和PNG Support
在phpinfo()的输出中,我如何启用JPEG Support
?
UPDATE
编译时遇到这个问题:
Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed) The output of /usr/local/apache2/bin/apxs follows: cannot open /usr/local/apache2/build/config_vars.mk: No such file or directory at /usr/local/apache2/bin/apxs line 218.
我现在应该怎么做?
首先cd到PHP源代码的目录。 然后
make clean
然后用JPEG支持进行编译(将其添加到您已经使用的所有其他编译选项中):
--with-jpeg-dir=<put path to jpeg library here>
例如,如果您的jpeg库位于:
/usr/lib/libjpeg.so
使用:
--with-jpeg-dir=/usr/lib