Some of the necessary configurations for compiling the Imagemagic library into the Nginx server _nginx

Source: Internet
Author: User
Tags imagemagick nginx server

1. First, add the corresponding header file of the ImageMagick library to the environment variable.

Copy Code code as follows:

Export C_include_path= $C _include_path:/usr/local/imagemagick/include/imagemagick/

The following path is different for everyone

Otherwise, you will receive the following error

Copy Code code as follows:

Wand/magickwand.h:no such file or directory

2. Add the corresponding library when linking

In the Obj/makefile file, locate the following line,

Copy Code code as follows:

OBJS/NGINX:OBJS/SRC/CORE/NGINX.O \

At the bottom of this add:
Copy Code code as follows:

' Pkg-config--cflags--libs magickwand '

Output the corresponding variable

Copy Code code as follows:

Export pkg_config_path=/usr/local/imagemagick/lib/pkgconfig/

Otherwise, make makes the following error:
Copy Code code as follows:

Undefined reference to ' magickwandgenesis '

Make

Make install on it.

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.