From 01f418ff7add6e1a2e11df3c03b0b9a4b1e2f479 Mon Sep 17 00:00:00 2001 From: Bohung Date: Fri, 18 Jun 2021 19:47:36 +0800 Subject: [PATCH] Update Imagemagick install info. --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 062ac06..a162e1c 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,26 @@ $ sudo systemctl restart mongod # 安全啟動 MongoDB,若已啟動則可跳 ## 安裝 ImageMagick 6.9.7-4 (部份預設模組需要處理圖片,此為相依軟體) ```sh -$ sudo apt install imagemagick -$ convert -version # 檢查是否安裝成功,並確認版本 +$ sudo apt-get install libjpeg62 +$ wget http://download.sourceforge.net/libpng/libpng-1.5.13.tar.gz +$ tar xvfz libpng-1.5.13.tar.gz +$ cd libpng-1.5.13/ +$ ./configure +$ make +$ sudo make install +# Build imagemagick +$ wget http://www.imagemagick.org/download/ImageMagick.tar.gz +$ tar xvfz ImageMagick.tar.gz +$ cd ImageMagick-7.1.0-0/ # cd ImageMagick-x.x.x-x(版本號) +$ ./configure --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --disable-shared +$ make +$ sudo make install +$ sudo ln -s /usr/local/lib/* /usr/lib/. +$ sudo ln -s /usr/local/bin/* /usr/bin/. +$ convert -list configure #確認為版本7.1.0.0以上 +####以下為舊的imagemagick安裝方式(請不要使用,會有圖片上傳後,解碼失敗問題) +#$ sudo apt install imagemagick +#$ convert -version # 檢查是否安裝成功,並確認版本 ``` ## Ubuntu 20.04 才需要的步驟