An error occurred while compiling and installing php7.0 on Mac.

Source: Internet
Author: User
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.

  1. Try./configure -- help to see what parameters can be added later. check whether there are any options similar to -- with-jpeg with-embedded Lib.

  2. 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.

  3. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.