湖濱散記部落格的樹心幽徑[login][主頁]
357:20170619install_magicK (20171231setup revised)


(1)download ImageMagick.tar.gz

https://www.imagemagick.org/script/install-source.php

(2)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ pwd
/home/treehrt
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ tar xvzf ImageMagick.tar.gz

(3)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ cd ImageMagick-7.0.6-0/
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ ./configure
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ make
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ sudo make install
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ sudo ldconfig /usr/local/lib
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ /usr/local/bin/convert logo: logo.gif
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ make check

(4)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ wget http://prdownloads.sourceforge.net/libpng/libpng-1.6.29.tar.gz?download
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ mv libpng-1.6.29.tar.gz\?download  libpng-1.6.29.tar.gz
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ tar xvzf libpng-1.6.29.tar.gz
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ cd libpng-1.6.29/
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/libpng-1.6.29$ ./configure
:
configure: error: zlib not installed


(5)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ wget https://zlib.net/zlib-1.2.11.tar.gz
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ tar xvzf zlib-1.2.11.tar.gz
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ cd zlib-1.2.11/
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/zlib-1.2.11$ ./configure
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/zlib-1.2.11$ make
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/zlib-1.2.11$ sudo make install

(6)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/zlib-1.2.11$ cd ../libpng-1.6.29/
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/libpng-1.6.29$ ./configure

 

 ./configure --prefix=/usr LDFLAGS="-L/usr/local/lib -lz"

treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/libpng-1.6.29$ make
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/libpng-1.6.29$ sudo make install

(7)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ tar xvzf freetype-2.8.tar.gz
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~$ cd freetype-2.8/
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/freetype-2.8$ ./configure
:
Library configuration:
  external zlib: yes (pkg-config)
  bzip2:         no
  libpng:        yes (pkg-config)
  harfbuzz:      no

make: Nothing to be done for `unix'.
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/freetype-2.8$ make
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/freetype-2.8$ sudo make install


(12)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/lake$ sudo apt-get install g++

(13)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/lake$ sudo apt-get install libmagick++-dev

:
設定 libx11-doc (2:1.6.2-1ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...

(14)
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ ./configure
:
        X_CFLAGS        =
        X_PRE_LIBS      =  -lSM -lICE
        X_LIBS          =
        X_EXTRA_LIBS    =

  Options used to compile and link:
    PREFIX          = /usr/local
    EXEC-PREFIX     = /usr/local
    VERSION         = 7.0.6
    CC              = gcc -std=gnu99 -std=gnu99
    CFLAGS          = -I/usr/include/libxml2   -I/usr/local/include/libpng16   -pthread -I/usr/include/OpenEXR     -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include     -I/usr/include/graphviz   -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng16   -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/include/freetype2   -pthread   -I/usr/local/include    -fopenmp -g -O2 -Wall -mtune=core-avx2 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
    CPPFLAGS        =   -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
    PCFLAGS         =
    DEFS            = -DHAVE_CONFIG_H
    LDFLAGS         = 
    LIBS            =
    CXX             = g++
    CXXFLAGS        = -g -O2 -pthread
    FEATURES        = DPC HDRI Cipher OpenMP
    DELEGATES       = bzlib djvu mpeg fontconfig freetype jbig jng jpeg lcms lqr lzma openexr png ps tiff wmf x xml zlib
==============================================================================

treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/ImageMagick-7.0.6-0$ sudo make install
:
I.pc Magick++/lib/Magick++.pc Magick++/lib/Magick++-7.Q16HDRI.pc '/usr/local/lib/pkgconfig'
make[2]: Leaving directory `/home/treehrt/ImageMagick-7.0.6-0'
make[1]: Leaving directory `/home/treehrt/ImageMagick-7.0.6-0'
treehrt@treehrt-BM6AE-BM1AE-BP1AE:~/lake$ sudo ldconfig /usr/local/lib

(15)20170823處理undefine refrence link問題

~/ImageMagick-7.0.6-0$ ./configure  --enable-shared

~/ImageMagick-7.0.6-0$ sudo make install

 


select id,article_id,topic,text from lt_articles_text where article_id =357; ok. update lt_articles set num_reads=num_reads +1 where id=357; ok.