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

Can't figure out how to compile imagick for openlitespeed/litespeed enterprise server for wordpress Ubuntu #649

Open
WillSARCats opened this issue Jan 31, 2024 · 2 comments

Comments

@WillSARCats
Copy link

WillSARCats commented Jan 31, 2024

I'm so new to coding and can't figure this out. Any help would be appreciated and I can test ideas put foward.

Openlitespeed server and I want to install ImageMagick version 7 for wordpress to allow AVIF converting.
The current lsrepo installs imagick 3.7.0 compiled with Image Magick 6.9

I could get ImageMagick installed easily enough (code below), how to I reinstall/manually compile lsphp-81 with the new ImageMagick version 7? Every effort still comes up compiled with 6.9.

//IMEI one-step ImageMagic version 7 install: https://github.com/SoftCreatR/imei (worked)
t=$(mktemp) &&
wget 'https://dist.1-2.dev/imei.sh' -qO "$t" &&
bash "$t" &&
rm "$t"

//Manually compiling imagick, but I don't think this applies to the litespeed server? (didn't achieve litespeed server compiling from version 7)
git clone https://github.com/Imagick/imagick
cd imagick
phpize && ./configure
make
make install

//I played around making this not understanding what I was doing. It didn't work.
git clone https://github.com/Imagick/imagick.git
/usr/local/lsws/lsphp81/bin/phpize
./configure --with-imagick=/usr/local/lsws/lsphp81
make
make install
touch /usr/local/lsws/admin/tmp/.lsphp_restart.txt
systemctl restart lsws

@Danack
Copy link
Collaborator

Danack commented Feb 8, 2024

//Manually compiling imagick,
git clone https://github.com/Imagick/imagick.git

For the record, the only releases I support are the releases made through https://pecl.php.net/package/imagick

I do occasionally screw up code in this repo, and so building from here is, perhaps more exciting than one might hope.

Manually compiling imagick, but I don't think this applies to the litespeed server?

Well, you need to compile the extension code, so that the litespeed server can use it.

What I'd suggest doing is finding out where the current imagick.so file is for the litespeed server. You might be able to do that by running the command find / -name imagick.so

That would allow you to see where the file needs to be. I'd suggest moving the current file out the way, mv imagick.so imagick.so.bak and then just copying the file you built into the directory.

Though it is also possible to tell the configure tool where you want the built files to be installed to:

./configure \
  --prefix=/usr/local/lsws/lsphp81 \
  --exec-prefix=/usr/local/lsws/lsphp81

btw, this is probably wrong:

./configure --with-imagick=/usr/local/lsws/lsphp81

I believe the --with-imagick is meant to point to the directory where ImagickMagick was installed to, so that you can tell Imagick explicitly where to look for it.

@WillSARCats
Copy link
Author

WillSARCats commented Feb 9, 2024 via email

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

2 participants