imagick.so not found "7.4"
FIRST RESORT:
PHP_VERSION=7.4
sudo apt install libmagickwand-dev imagemagick
sudo apt-get install -y php${PHP_VERSION}-imagick
echo "Check if it worked"
php -m | grep imagick
ext_dir=$(php-config --extension-dir)
output_disable
if [ -f "$ext_dir/imagick.so" ]; then
echo "$FILE exists so imagick appears to have installed"
else
echo"$FILE does not exist so imagick probably failed"
fi
### LAST RESORT (if the above did not work) ###
sudo apt install php7.4-dev (if not already installed)
# check your pecl Version (must match with 7.4): pecl version
# make sure that sed is executable from /bin/sed
# (the pecl install needs it to be there, I had to symlink it from /usr/bin/sed)
sudo apt install libmagickwand-dev
sudo pecl install imagick
# Then you can carry on with the steps you already made:
sudo echo extension=imagick.so > /etc/php/7.4/mods-available/imagick.ini
sudo ln -s /etc/php/7.4/mods-available/imagick.ini /etc/php/7.4/fpm/conf.d/20-imagick.ini
sudo ln -s /etc/php/7.4/mods-available/imagick.ini /etc/php/7.4/cli/conf.d/20-imagick.ini
# After that, restart your services (php7.4-fpm, apache, nginx, ...).