Compile the ImageMagic library into some necessary configuration of the nginx server
- 2020-05-09 19:53:10
- OfStack
1. Start by adding the appropriate header file of the ImageMagick library to the environment variable
export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/ImageMagick/include/ImageMagick/
The following path will vary from person to person
Otherwise the following error will occur
wand/MagickWand.h: No such file or directory
2. Add the corresponding library when linking
In the obj/Makefile file, find the following line,
objs/nginx: objs/src/core/nginx.o \
And at the bottom of this we add:
`pkg-config --cflags --libs MagickWand`
Output corresponding variables
export PKG_CONFIG_PATH=/usr/local/ImageMagick/lib/pkgconfig/
Otherwise, make will still make the following mistakes:
undefined reference to `MagickWandGenesis'
make
make install will do