How to compile the ImageMagic library into the nginx server
This article focuses on "how to compile the ImageMagic library into the nginx server", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to compile the ImageMagic library into the nginx server.
1. First, add the corresponding header file of the imagemagick library to the environment variable
The copy code is as follows:
Export c_include_path=$c_include_path:/usr/local/imagemagick/include/imagemagick/
The latter path varies according to each person's situation.
Otherwise, the following error will occur
The copy code is as follows:
Wand/magickwand.h: no such file or directory
2. Add the corresponding library when you link
In the obj/makefile file, find the following line
The copy code is as follows:
Objs/nginx: objs/src/core/nginx.o\
At the bottom of this, add:
The copy code is as follows:
`pkg-config-- cflags-- libs magickwand`
Output the corresponding variables
The copy code is as follows:
Export pkg_config_path=/usr/local/imagemagick/lib/pkgconfig/
Otherwise, the following errors will still occur during make:
The copy code is as follows:
Undefined reference to `magickwandgenesis'
Make
Make install is fine.
At this point, I believe you have a deeper understanding of "how to compile the ImageMagic library into the nginx server". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!