Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error php: symbol lookup error #80

Closed
nightdread opened this issue May 28, 2023 · 19 comments
Closed

Error php: symbol lookup error #80

nightdread opened this issue May 28, 2023 · 19 comments

Comments

@nightdread
Copy link

php -r 'phpinfo();' | grep HEIC
php: symbol lookup error: /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders/heic.so: undefined symbol: heif_init

@SoftCreatR
Copy link
Owner

Please provide the imei.log of your last installation.

@nightdread
Copy link
Author

imei.log

@SoftCreatR
Copy link
Owner

SoftCreatR commented May 28, 2023

Did you install php-imagick using apt? Because that won't work. Instead:

git clone https://github.com/Imagick/imagick.git
cd imagick
phpize
./configure
make
make install

Finally, add extension=imagick to your php.ini (and restart PHP, if needed) and you are done.

root@IM-Ampere:~/imagick# php -r 'phpinfo();' | grep HEIC
ImageMagick supported formats => 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, BAYER, BAYERA, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLV, FRACTAL, FTP, FTS, FTXT, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, JXL, K25, KDC, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, QOI, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RSVG, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, STRIMG, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YAML, YCbCr, YCbCrA, YUV

@nightdread
Copy link
Author

I install imagick by PECL

@SoftCreatR
Copy link
Owner

I didn't test it using PECL, but the manual installation as described above works as expected. At least, after 3cdb9a7

@maxxer
Copy link

maxxer commented Aug 28, 2023

I'm having the same error when I try to run the installation a second time.

I'm compiling and installing via Ansible, when I deploy the VM for the first time and run the playbook it works, PHP is installed with Imagick and HEIC support. If I happen to run it twice, then I get the reported error. And I cannot figure out what's wrong...

# ldd /usr/lib/php/20180731/imagick.so
	linux-vdso.so.1 (0x0000ffffbf0e2000)
	libgomp.so.1 => /lib/aarch64-linux-gnu/libgomp.so.1 (0x0000ffffbefb0000)
	libMagickWand-7.Q16HDRI.so.10 => /usr/local/lib/libMagickWand-7.Q16HDRI.so.10 (0x0000ffffbee70000)
	libMagickCore-7.Q16HDRI.so.10 => /usr/local/lib/libMagickCore-7.Q16HDRI.so.10 (0x0000ffffbeb50000)
	libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffbe9a0000)
	/lib/ld-linux-aarch64.so.1 (0x0000ffffbf0a9000)
	libX11.so.6 => /lib/aarch64-linux-gnu/libX11.so.6 (0x0000ffffbe850000)
	libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffffbe7b0000)
	libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffffbe780000)
	liblcms2.so.2 => /lib/aarch64-linux-gnu/liblcms2.so.2 (0x0000ffffbe710000)
	libraqm.so.0 => /lib/aarch64-linux-gnu/libraqm.so.0 (0x0000ffffbe6f0000)
	liblqr-1.so.0 => /lib/aarch64-linux-gnu/liblqr-1.so.0 (0x0000ffffbe6d0000)
	libfftw3.so.3 => /lib/aarch64-linux-gnu/libfftw3.so.3 (0x0000ffffbe600000)
	libxml2.so.2 => /lib/aarch64-linux-gnu/libxml2.so.2 (0x0000ffffbe410000)
	libfontconfig.so.1 => /lib/aarch64-linux-gnu/libfontconfig.so.1 (0x0000ffffbe3b0000)
	libfreetype.so.6 => /lib/aarch64-linux-gnu/libfreetype.so.6 (0x0000ffffbe2e0000)
	libXext.so.6 => /lib/aarch64-linux-gnu/libXext.so.6 (0x0000ffffbe2b0000)
	libbz2.so.1.0 => /lib/aarch64-linux-gnu/libbz2.so.1.0 (0x0000ffffbe280000)
	libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000ffffbe250000)
	libltdl.so.7 => /lib/aarch64-linux-gnu/libltdl.so.7 (0x0000ffffbe230000)
	libxcb.so.1 => /lib/aarch64-linux-gnu/libxcb.so.1 (0x0000ffffbe1f0000)
	libharfbuzz.so.0 => /lib/aarch64-linux-gnu/libharfbuzz.so.0 (0x0000ffffbe110000)
	libfribidi.so.0 => /lib/aarch64-linux-gnu/libfribidi.so.0 (0x0000ffffbe0e0000)
	libglib-2.0.so.0 => /lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000ffffbdf90000)
	libicuuc.so.70 => /lib/aarch64-linux-gnu/libicuuc.so.70 (0x0000ffffbdd80000)
	liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000ffffbdd40000)
	libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000ffffbdd00000)
	libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000ffffbdce0000)
	libpng16.so.16 => /lib/aarch64-linux-gnu/libpng16.so.16 (0x0000ffffbdc90000)
	libbrotlidec.so.1 => /lib/aarch64-linux-gnu/libbrotlidec.so.1 (0x0000ffffbdc70000)
	libXau.so.6 => /lib/aarch64-linux-gnu/libXau.so.6 (0x0000ffffbdc50000)
	libXdmcp.so.6 => /lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000ffffbdc30000)
	libgraphite2.so.3 => /lib/aarch64-linux-gnu/libgraphite2.so.3 (0x0000ffffbdc00000)
	libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000ffffbdb80000)
	libicudata.so.70 => /lib/aarch64-linux-gnu/libicudata.so.70 (0x0000ffffbbf50000)
	libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffffbbd20000)
	libbrotlicommon.so.1 => /lib/aarch64-linux-gnu/libbrotlicommon.so.1 (0x0000ffffbbce0000)
	libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000ffffbbcb0000)
	libmd.so.0 => /lib/aarch64-linux-gnu/libmd.so.0 (0x0000ffffbbc90000)

@maxxer
Copy link

maxxer commented Aug 28, 2023

NVM... I tried several times again and it always worked fine. 🤷🏼‍♂️

@WillSARCats
Copy link

would this workd for lsphp too? Kind of a pain figuring out how to get this AVIF plugin to work. It requries imagick version 7, but 3.7.0 currently only compiles from Image Magick 6.9

https://www.cachecrawler.com/WP-Plugins/WP-Plugin-avif-webp-Replacement-for-LiteSpeed-LScache::6574.html

From emailing the developer, he replied with this: Imagick is not part of LSWS. Regarding ImageMagick, this is the PHP related. Imagick is OS related, although there are differences. As long as you optimize and convert images with PHP, only ImageMagick is relevant to you, which also applies to the AWR plugin, since the AWR plugin uses ImageMagick. This means that you only need ImageMagick version 7 and above for the AWR plugin, but you do not need Imagick. The AWR plugin checks whether ImageMagick version 7 or higher is available. Otherwise you wouldn't be able to access the AWR plugin at all. That's why I think you're trying to solve a problem that I don't think exists when it comes to the AWR plugin. With PHP 8.1 or higher you already have everything you need for the AWR plugin.

@SoftCreatR
Copy link
Owner

would this workd for lsphp too? Kind of a pain figuring out how to get this AVIF plugin to work. It requries imagick version 7, but 3.7.0 currently only compiles from Image Magick 6.9

https://www.cachecrawler.com/WP-Plugins/WP-Plugin-avif-webp-Replacement-for-LiteSpeed-LScache::6574.html

From emailing the developer, he replied with this: Imagick is not part of LSWS. Regarding ImageMagick, this is the PHP related. Imagick is OS related, although there are differences. As long as you optimize and convert images with PHP, only ImageMagick is relevant to you, which also applies to the AWR plugin, since the AWR plugin uses ImageMagick. This means that you only need ImageMagick version 7 and above for the AWR plugin, but you do not need Imagick. The AWR plugin checks whether ImageMagick version 7 or higher is available. Otherwise you wouldn't be able to access the AWR plugin at all. That's why I think you're trying to solve a problem that I don't think exists when it comes to the AWR plugin. With PHP 8.1 or higher you already have everything you need for the AWR plugin.

See https://github.com/SoftCreatR/imei?tab=readme-ov-file#php-imagick-extension

@WillSARCats
Copy link

I still get this in the phpini for wordpress in litespeed server:

Imagick compiled with ImageMagick version | ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org

If I try removing ImageMagic 6 before installing 7 as well, the server kind of breaks.

@SoftCreatR
Copy link
Owner

If I try removing ImageMagic 6 before installing 7 as well, the server kind of breaks.

What does that mean?

@WillSARCats
Copy link

Over on this website is a guide similiar to this githubs, which includes removing 6 first? I tried both doing that (breaks server) and not doing that and just this github's install method with your 'see' - which still lists ImageMagick 6.9 in phpinfo in the wordpress root

https://doc.owncloud.com/server/next/admin_manual/installation/manual_installation/manual_imagick7.html

@SoftCreatR
Copy link
Owner

breaks server

I still don't know, what that means exactly.

@WillSARCats
Copy link

WillSARCats commented Jan 31, 2024 via email

@SoftCreatR
Copy link
Owner

SoftCreatR commented Jan 31, 2024

https://www.reddit.com/r/Litespeed/comments/1adk6yz/how_to_compile_and_install_latest_imagik_version/

That was you, I guess? Maybe, you can define the ImageMagick path when compiling the imagick module. But tbh, I don't know. Maybe you can ask there: https://github.com/Imagick/imagick

the Kitt AWR plugin would stop working in Wordpress.

I don't think so.

@WillSARCats
Copy link

WillSARCats commented Jan 31, 2024 via email

@SoftCreatR
Copy link
Owner

#80 (comment)

@WillSARCats
Copy link

thats what I tried first

@SoftCreatR
Copy link
Owner

https://github.com/Imagick/imagick.git

That's how to compile Imagick manually. But as I said: If you don't remove IM 6 first, you have to find a way to tell imagick to use a different library location. But I don't know, if that works. So I'd recommend you to ask here.

If that doesn't work, there's no other way than uninstalling IM 6 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants