How to compile the ImageMagic library into the nginx server

PHPz
Release: 2023-05-12 10:46:20
forward
757 people have browsed it

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

Copy the code The code is as follows:

export c_include_path=$c_include_path :/usr/local/imagemagick/include/imagemagick/

The following path depends on everyone’s situation

Otherwise, the following error will occur

Copy the code. The code is as follows:

wand/magickwand.h: no such file or directory

2. Add the corresponding library when linking

In the obj/makefile file, find the following line,

Copy the code The code is as follows:

objs/nginx:             objs/src/core/nginx.o \

Add at the bottom of this:

Copy the code The code is as follows:

`pkg-config --cflags --libs magickwand`

Output the corresponding variables

Copy the code The code is as follows:

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

Otherwise, make The following error still occurs:

Copy code The code is as follows:

undefined reference to `magickwandgenesis'

make

Just make install

The above is the detailed content of How to compile the ImageMagic library into the nginx server. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template