상세 컨텐츠

본문 제목

PHP 컴파일 설치 시 오류 모음

mysql

by 2hansoul 2021. 7. 1. 16:58

본문

반응형

CentOS 64bit에서 libjpeg,와 libpng 에서 해당 라이브러리를 못찾아 confiig 가 안되는 경우가 종종있다.

 

configure: error: libjpeg.(a|so) not found.

 

whereis libjpeg 명령으로 해당 라이브러리 경로를 확인 후에

# ln -s /usr/lib64/libjpeg.so /usr/lib/

# ln -s /usr/lib64/libpng.so /usr/lib/

심볼릭 링크(ln 단순히 원본파일을 가리키도록 링크 시켜둔 windows:바로가기) 후에

 

config 옵션을 --with-jpeg-dir=/usr/lib , --with-png-dir=/usr/lib 로 하면 됨.

 

 

PHP 컴파일 설치 시 오류

 

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

개발환경 : CentOS 7

yum -y install epel-release

yum -y install php-mcrypt

yum -y install libmcrypt-devel

 

Configure: error: Cannot find MySQL header files under /usr.

Note that the MySQL client library is not bundled anymore!

해결 방법

# yum –y install mysql-devel

 

configure: error: Cannot find libmysqlclient_r under /usr.

Note that the MySQL client library is not bundled anymore!

 

해석

Mysql 컴파일시 configure    --enable-thread-safe-client 넣어서 진행 해보라고 했지만

괜히 하다가 꼬일 같아서 php configure 과정에서 --with-libdir=lib64 \ 추가 한후

Cd /usr/local/mysql

Ln -s lib lib64 설정후 install 하였다

 

 

//해석

wget -O php.patch https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt

 patch -p0 -b < php.patchpatching file ext/dom/node.c

 

Cofigure make 진행시 오류가 나옴

/home/segio_php/php-5.2.17/ext/dom/node.c: In function ‘dom_canonicalization’:

/home/segio_php/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type

/home/segio_php/php-5.2.17/ext/dom/node.c:1955:5: error: dereferencing pointer to incomplete type

 

//해석

[root@localhost] wget -O php.patch  https://mail.gnome.org/archives/xml/2012-August/txtbgxGXAvz4N.txt

[root@localhost] cd php-5.2.17

[root@localhost] patch -p0 -b < php.patch

patching file ext/dom/node.c

Hunk #1 succeeded at 1950 (offset 55 lines).

patching file ext/dom/documenttype.c

Hunk #1 succeeded at 215 (offset 10 lines).

patching file ext/simplexml/simplexml.c

Hunk #1 succeeded at 1343 (offset -74 lines).

 

Patch install안되면 yum으로 설치후 진행

 

 

Configure make 진행시 오류

 

/bin/ld: cannot find -lltdl

collect2: error: ld returned 1 exit status

make: *** [libphp5.la] Error 1

 

해석

yum list | grep libtool-ltdl 확인   설치 되어 있음

[root@localhost php-5.2.17]# yum list | grep libtool-ltdl

libtool-ltdl.x86_64                         2.4.2-22.el7_3             @anaconda

libtool-ltdl.i686                           2.4.2-22.el7_3             base    

libtool-ltdl-devel.i686                     2.4.2-22.el7_3             base    

libtool-ltdl-devel.x86_64                   2.4.2-22.el7_3             base 

 

반응형

'mysql' 카테고리의 다른 글

php mysql 연동  (0) 2021.07.05
Mysql time_wait 설정  (0) 2021.07.02
Mysql 계정 생성  (0) 2021.06.30
mariadb 컴파일 설치 Centos7  (0) 2021.06.29
Centos7 MariaDB yum 설치  (0) 2021.06.28

관련글 더보기

댓글 영역