Dieser Artikel erfordert mehr Erfahrung im Umgang mit Linux und ist daher nur für fortgeschrittene Benutzer gedacht.
Imagemagick
Dieses Tutorial beschreibt wie man die PECL-Extension Imagick einfach in PHP 7 integriert.
Dieses Tutorial ist als praktischer Leitfaden gedacht und behandelt keine theoretischen Hintergründe. Diese werden in einer Vielzahl von anderen Dokumenten im Internet behandelt.
Für die Richtigkeit der Inhalte dieses Tutorials gebe ich keinerlei Garantie. Der hier gezeigte Weg ist nicht der einzige um ein solches System aufzusetzen, es ist lediglich, der, den ich bevorzuge.
Imagemagick für php7 unter ubuntu?
Für php 7.0: sudo apt-get install php7.0-imagick
Für php 7.1: sudo apt-get install php7.1-imagick
Für php 7.2: sudo apt-get install php7.2-imagick
Für php 7.3: sudo apt-get install php7.3-imagick
Für php 7.4 : sudo apt-get install php7.4-imagick
Restart PHP / Apache
Für php-fpm:
service php7.VERSION-fpm restart
service apache2 restart
Selber kompilieren:
Sollte kein Modul zur Verfügung stehen oder man benötigt mehr Kontrolle:
Hier der alte Weg:
Diese » PECL-Extension ist nicht Teil von PHP.
Information zur Installation dieser PECL-Extension findet ihr im Kapitel Installation von PECL-Extensions. Zusätzliche Informationen wie neue Releases, Downloads, Quelldateien, Maintainerinformation und ein CHANGELOG findet ihr hier: » http://pecl.php.net/package/imagick.
1. Download
Zuerst besorgen wir uns den Source Code von Github und bereiten im Anschluss unsere build Umgebung vor.
git clone https://github.com/mkoppanen/imagick.git imagick
2. imagick kompilieren
cd imagick
phpize
./configure
make
sudo make install
Hierbei kam es zu folgenden Fehlermeldungen:
Möglicherweise kommt es während dem configure Befehl zu systemspezifischen Fehlermeldungen, dies hängt davon ab welche Pakete bereits installiert wurden.
Beispiel einer Fehlermeldung:
Configuring for: PHP Api Version: 20151012 Zend Module Api No: 20151012 Zend Extension Api No: 320151012 openSUSE-422-64-minimal:/opt/imagick # ./configure checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib checking for PHP extension directory... /usr/lib64/php7/extensions checking for PHP installed headers prefix... /usr/include/php7 checking if debug is enabled... no checking if zts is enabled... no checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking whether to enable the imagick extension... yes, shared checking for pkg-config... /usr/bin/pkg-config checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist checking Testing /usr/bin/MagickWand-config... Doesn't exist checking Testing /usr/sbin/bin/MagickWand-config... Doesn't exist checking Testing /opt/bin/MagickWand-config... Doesn't exist checking Testing /opt/local/bin/MagickWand-config... Doesn't exist configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.
Ich habe re2c und MagickWand installiert.
checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for PHP prefix... /usr checking for PHP includes... -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib checking for PHP extension directory... /usr/lib64/php7/extensions checking for PHP installed headers prefix... /usr/include/php7 checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 0.13.6 (ok) checking for gawk... gawk checking whether to enable the imagick extension... yes, shared checking for pkg-config... /usr/bin/pkg-config checking ImageMagick MagickWand API configuration program... checking Testing /usr/local/bin/MagickWand-config... Doesn't exist checking Testing /usr/bin/MagickWand-config... It exists found in /usr/bin/MagickWand-config checking if ImageMagick version is at least 6.2.4... found version 7.0.5 Q16 HDRI checking for MagickWand.h or magick-wand.h header... user location /usr/include/ImageMagick-7/wand/MagickWand.h checking PHP version is at least 5.3.2... yes. found 7.0.7 libs -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI checking for MagickGetVersion... yes checking for MagickSetImageInterpolateMethod... yes checking how to print strings... printf checking for a sed that does not truncate output... (cached) /usr/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by cc... /usr/x86_64-suse-linux/bin/ld checking if the linker (/usr/x86_64-suse-linux/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/x86_64-suse-linux/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking for gawk... (cached) gawk checking command to parse /usr/bin/nm -B output from cc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if cc supports -fno-rtti -fno-exceptions... no checking for cc option to produce PIC... -fPIC -DPIC checking if cc PIC flag -fPIC -DPIC works... yes checking if cc static flag -static works... no checking if cc supports -c -o file.o... yes checking if cc supports -c -o file.o... (cached) yes checking whether the cc linker (/usr/x86_64-suse-linux/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no configure: creating ./config.status config.status: creating config.h config.status: executing libtool commands
/bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick_file.c -o imagick_file.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick_file.c -fPIC -DPIC -o .libs/imagick_file.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick_class.c -o imagick_class.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick_class.c -fPIC -DPIC -o .libs/imagick_class.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickdraw_class.c -o imagickdraw_class.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickdraw_class.c -fPIC -DPIC -o .libs/imagickdraw_class.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickpixel_class.c -o imagickpixel_class.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickpixel_class.c -fPIC -DPIC -o .libs/imagickpixel_class.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickpixeliterator_class.c -o imagickpixeliterator_class.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickpixeliterator_class.c -fPIC -DPIC -o .libs/imagickpixeliterator_class.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick_helpers.c -o imagick_helpers.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick_helpers.c -fPIC -DPIC -o .libs/imagick_helpers.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick.c -o imagick.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagick.c -fPIC -DPIC -o .libs/imagick.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickkernel_class.c -o imagickkernel_class.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/imagickkernel_class.c -fPIC -DPIC -o .libs/imagickkernel_class.o /bin/sh /opt/imagick/libtool --mode=compile cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/shim_im6_to_im7.c -o shim_im6_to_im7.lo libtool: compile: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-7 -I. -I/opt/imagick -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -c /opt/imagick/shim_im6_to_im7.c -fPIC -DPIC -o .libs/shim_im6_to_im7.o /bin/sh /opt/imagick/libtool --mode=link cc -DPHP_ATOM_INC -I/opt/imagick/include -I/opt/imagick/main -I/opt/imagick -I/usr/include/php7 -I/usr/include/php7/main -I/usr/include/php7/TSRM -I/usr/include/php7/Zend -I/usr/include/php7/ext -I/usr/include/php7/ext/date/lib -I/usr/include/ImageMagick-7 -DHAVE_CONFIG_H -g -O2 -o imagick.la -export-dynamic -avoid-version -prefer-pic -module -rpath /opt/imagick/modules imagick_file.lo imagick_class.lo imagickdraw_class.lo imagickpixel_class.lo imagickpixeliterator_class.lo imagick_helpers.lo imagick.lo imagickkernel_class.lo shim_im6_to_im7.lo -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI libtool: link: cc -shared -fPIC -DPIC .libs/imagick_file.o .libs/imagick_class.o .libs/imagickdraw_class.o .libs/imagickpixel_class.o .libs/imagickpixeliterator_class.o .libs/imagick_helpers.o .libs/imagick.o .libs/imagickkernel_class.o .libs/shim_im6_to_im7.o -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -O2 -Wl,-soname -Wl,imagick.so -o .libs/imagick.so libtool: link: ( cd ".libs" && rm -f "imagick.la" && ln -s "../imagick.la" "imagick.la" ) /bin/sh /opt/imagick/libtool --mode=install cp ./imagick.la /opt/imagick/modules libtool: install: cp ./.libs/imagick.so /opt/imagick/modules/imagick.so libtool: install: cp ./.libs/imagick.lai /opt/imagick/modules/imagick.la libtool: finish: PATH="/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/sbin" ldconfig -n /opt/imagick/modules ---------------------------------------------------------------------- Libraries have been installed in: /opt/imagick/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- Build complete. Don't forget to run 'make test'. openSUSE-422-64-minimal:/opt/imagick # make test Build complete. Don't forget to run 'make test'. ERROR: Cannot run tests without CLI sapi. openSUSE-422-64-minimal:/opt/imagick # make testmake install Installing shared extensions: /usr/lib64/php7/extensions/ Installing header files: /usr/include/php7/
3. imagick kompilieren
Falls alles ohne Fehler durchgelaufen ist, kompilieren wir schlussendlich unsere Imagemagick Erweiterung und fügen sie der Konfiguration hinzu:
echo "extension=imagick.so" >> /path/to/php.ini
4. Restart PHP / Apache
For php-fpm:
service php7-fpm restart
service apache2 restart
Imagick ist eine PHP-Erweiterungen, mit der wir die wichtigsten Funktionen der freien Bildbearbeitungssoftware “ImageMagick” innerhalb von PHP verwendet werden können.
Versionen der Änderungen:
Version 2.0 28. April 2017
Version 1.0 31. Mai 2016
Jetzt bist du gefragt!
Hast du Anregungen, Ergänzungen, einen Fehler gefunden oder ist dieser Beitrag nicht mehr aktuell? Dann freue ich mich auf deinen Kommentar.