GD / ZLIB / PNG / JPEG / FREETYPE 라이브러리 설치

—————————————-

리눅스 시스템에서의 GD 라이브러리 설치법

—————————————-

검색으로 찾아낸 설치법들을 확인한결과… 상당히 번거로운 라이브러리로 보인다.

이것저것 부가적으로 설치해야되는 라이브러리가 4개나 된다.

1. 필요한 라이브러리 좌표

– zlib 다운로드 : http://www.zlib.net

– png 다운로드 : http://www.libpng.org/pub/png/libpng.html

– JPEG 다운로드 : http://www.ijg.org

– freetype 다운로드 : http://download.savannah.gnu.org/releases/freetype/

– GD 다운로드 : http://www.boutell.com/gd/http/gd-2.0.33.tar.gz

※ 첫 설치하면서 함께  포스팅중이다. 최신버전의 라이브러리를 받아서 진행중임!!

※ root 디렉토리에 다운 받음

2. zlib 설치

./configure -shared -prefix=/usr/local/zlib

make

make install

3. png 설치

./configure -prefix=/usr/local/libpng

make

make install

4. jpeg 설치

———————————————-

참고:

설치시 디렉토리 에러가 나는 경우가 있다고 한다.

버전 6b에서 일어나는 에러인 것으로 보인다.

8b를 받아 설치중이며 디렉토리 에러는 나타나지 않았다.

혹여라도 make install 중에 디렉토리 에러메시지가 보인다면 아래처럼 디렉토리를 생성한다.

mkdir -p /usr/man/man1/

———————————————-

./configure -prefix=/usr/local/jpeg -enable-shared -enable-statie

make

make install

5. freetype 설치

./configure -prefix=/usr/local/freetype

make setup

make install

6. GD 설치

./configure -prefix=/usr/local/gd

=================================================================

출력문 일부 참고:

Support for PNG library: yes

Support for JPEG library: yes

Support for Freetype 2.x library: yes // 무료 폰트 렌더링 라이브러리

Support for Fontconfig library: no

Support for Xpm library: no //unix의 이미지 포맷 라이브러리

Support for pthreads: yes

=================================================================

make

———————————————-

참고:

make시 에러가 나는 경우가 있다고 한다.

현재 설치중인 버전은 2.0.33 이다.

2.0.35 버전 설치중에 일어나는 현상인듯하다. 현재 설치버전엔 나타나지 않았다.

에러내용은 아래와 같다.

cd . && /bin/sh /usr/local/src/gd-2.0.35/config/missing –run aclocal-1.9 -I config

aclocal:configure.ac:64: warning: macro `AM_ICONV’ not found in library

cd . && /bin/sh /usr/local/src/gd-2.0.35/config/missing –run automake-1.9 –foreign

cd . && /bin/sh /usr/local/src/gd-2.0.35/config/missing –run autoconf

configure.ac:64: error: possibly undefined macro: AM_ICONV

If this token and others are legitimate, please use m4_pattern_allow.

See the Autoconf documentation.

make: *** [configure] 오류 1

———————————————-

make install
7. 끝으로
php에서 사용하는 분들이 많은 것 같다.
검색으로 나오는 웬만한 설치법들은 끝부분에 php설정도 함께 게시하고 있다.
그래서 나도 적어볼란다. ㅋㅋ
php 컴파일시
./configure 옵션에 아래사항 추가
–with-gd=/usr/local/gd \
–with-jpeg-dir=/usr/local/jpeg \
–with-freetype-dir=/usr/local/freetype \
–with-png-dir=/usr/local/libpng \
–with-zlib-dir=/usr/local/zlib
** 이 블러그 보시고 설치하신 분은 아래처럼
./configure –prefix=/usr/local/php –with-exec-dir=/usr/bin –with-apxs2=/usr/local/apache/bin/apxs –with-apache-install=/usr/local/apache –with-mysql=/usr/local/mysql –with-config-file-path=/etc –disable-debug –enable-track-vars –enable-sockets –with-png-dir=/usr/local/libpng –with-freetype-dir=/usr/local/freetype –with-mod_charset –with-charset=euc_kr –with-xml –with-language=korean –enable-mailparse –enable-calender –enable-sysvsem=yes –enable-sysvshm=yes –enable-ftp –enable-magic-quotes –enable-gd-native-ttf –enable-versioning –enable-url-includes –enable-trans-id –enable-inline-optimization –with-iconv –enable-mbstring –enable-mbregex –with-gd=/usr/local/gd –with-ttf –with-gettext –enable-sigchild –enable-module=so –enable-versioning –enable-url-includes –enable-trans-id –enable-inline-optimization –enable-bcmath –with-jpeg –with-png –with-zlib –with-jpeg-dir=/usr/local/jpeg –with-png-dir=/usr/local/libpng –with-zlib-dir=/usr/local/zlib
 

댓글

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다