Last active
April 8, 2022 21:36
-
-
Save john-clark/7a889c345f5b72231003137c1077c692 to your computer and use it in GitHub Desktop.
fix magick on deb 11 for nextcloud heic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#test if enabled in magick | |
magick -list format |grep HEIC | |
#test if enabled in php | |
php -r 'phpinfo();' | grep HEIC | |
#enable src by removing # | |
sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list | |
#update os and install dependancies | |
apt-get update ; apt-get upgrade | |
apt-get install git build-essential autoconf automake libtool git-core | |
apt-get build-dep imagemagick libmagickcore-dev libde265 libheif php-imagick | |
#compile libheif module | |
git clone https://github.com/strukturag/libheif.git /usr/local/src/libheif | |
cd /usr/local/src/libde265/ | |
./autogen.sh | |
./configure | |
make | |
make install | |
#compile libde265 module | |
git clone https://github.com/strukturag/libde265.git /usr/local/src/libde265 | |
cd /usr/local/src/libde265 | |
./autogen.sh | |
./configure | |
make | |
make install | |
# compile magick | |
git clone https://github.com/ImageMagick/ImageMagick.git /usr/local/src/ImageMagick | |
cd /usr/local/src/ImageMagick | |
./configure | |
./configure --with-modules | |
./configure --with-heic=yes | |
make -j 4 # number of cpus | |
make install | |
ldconfig /usr/local/lib # update dynamic linker run-time bindings | |
#test if enabled | |
magick -list format |grep HEIC | |
php -r 'phpinfo();' | grep HEIC | |
#if enabled | |
sudo -u www-data php -f /var/www/nextcloud/occ preview:generate-all | |
#if not | |
#check install documentation after configure if not working | |
Delegate library configuration: | |
BZLIB --with-bzlib=yes yes | |
Autotrace --with-autotrace=no no | |
DJVU --with-djvu=yes yes | |
DPS --with-dps=yes no | |
FFTW --with-fftw=no no | |
FLIF --with-flif=no no | |
FlashPIX --with-fpx=yes no | |
FontConfig --with-fontconfig=yes yes | |
FreeType --with-freetype=yes yes | |
Ghostscript lib --with-gslib=no no | |
Graphviz --with-gvc=yes no | |
HEIC --with-heic=yes yes <----------------------- | |
JBIG --with-jbig=yes yes | |
JPEG v1 --with-jpeg=yes yes | |
JPEG XL --with-jxl=no no | |
LCMS --with-lcms=yes yes | |
LQR --with-lqr=yes yes | |
LTDL --with-ltdl=yes yes | |
LZMA --with-lzma=yes yes | |
Magick++ --with-magick-plus-plus=yes yes | |
OpenEXR --with-openexr=yes yes | |
OpenJP2 --with-openjp2=yes yes | |
PANGO --with-pango=yes yes | |
PERL --with-perl=no no | |
PNG --with-png=yes yes | |
RAQM --with-raqm=yes no | |
RAW --with-raw=yes no | |
RSVG --with-rsvg=no no | |
TIFF --with-tiff=yes yes | |
WEBP --with-webp=yes yes | |
WMF --with-wmf=yes yes | |
X11 --with-x= yes | |
XML --with-xml=yes yes | |
ZIP --with-zip=yes no | |
ZLIB --with-zlib=yes yes | |
ZSTD --with-zstd=yes no | |
#if not working in php (replace x.y with version) | |
echo extension=imagick.so > /etc/phpX.Y-sp/conf.d/imagick.ini" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment