Update Imagemagick install info.

This commit is contained in:
BoHung Chiu 2021-06-18 19:47:36 +08:00
parent c486a7ba9d
commit 01f418ff7a
1 changed files with 20 additions and 2 deletions

View File

@ -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 才需要的步驟