When PHP7.0 is compiled and installed on Mac, the following error occurs: configure: error: jpeglib. hnotfound. I know that libjpeg-dev needs to be installed in Ubuntu. However, I cannot find this software package by using brew in Mac. I can find it on the Internet and use brew to install libjp... when PHP7.0 is compiled and installed on Mac, the following error occurs:
configure: error: jpeglib.h not found.
You need to install Ubuntu based on your previous installation experience.libjpeg-dev
However, in MacbrewThe software package cannot be found. You can use it online.brewInstalllibjpegYes, but it is not successful after installation. The error is still reported. I want to ask, how can this problem be solved? Thank you ~~
Reply content:
When PHP7.0 is compiled and installed on Mac, the following error occurs:
configure: error: jpeglib.h not found.
You need to install Ubuntu based on your previous installation experience.libjpeg-dev
However, in MacbrewThe software package cannot be found. You can use it online.brewInstalllibjpegYes, but it is not successful after installation. The error is still reported. I want to ask, how can this problem be solved? Thank you ~~
This is not a good answer, but according to experience, this problem can be solved by specifying a path in./configure -- with-libjpeg.
-
Try./configure -- help to see what parameters can be added later. check whether there are any options similar to -- with-jpeg with-embedded Lib.
-
Although you have installed libjpeg through brew, the file is installed in the directory specified by brew. The impression is/usr/local/Cellar/libjpeg, the lib file is not added to the/usr/local/include/usr/lib directory.
-
In summary, you can only manually specify the libjpeg library file path. Note that after brew is installed, a version number is available, it may be/usr/local/Cellar/libjpeg/1.02/. When you manually specify a path, be sure to complete the path. Do not stop at the libjpeg layer, in this way, the compiling program still cannot find the library file.
Try it more. Compiling and installation by yourself will always cause various problems.