PHP 5.4.31 컴파일 오류 나옵니다.

[root@localhost php-5.4.31]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --with-gd --with-freetype-dir=/usr/local/freetype --with-zlib --enable-sockets --enable-gd-native-ttf --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --enable-sigchild --with-gettext --enable-mbstring --enable-inline-optimization --enable-bcmath --enable-shmop --enable-calendar --enable-ftp --with-gdbm --with-iconv --enable-mbregex --with-imap-ssl --with-openssl --with-curl --enable-soap --with-mcrypt=/usr/local --with-mysqli=/usr/local/mysql/bin/mysql_config --with-kerberos --enable-zip

중략!

checking whether time.h and sys/time.h may both be included... yes

checking for working alloca.h... (cached) yes

checking for alloca... (cached) yes

checking for working memcmp... yes

checking for stdarg.h... (cached) yes

checking for mcrypt support... yes

checking for libmcrypt version... >= 2.5.6

checking for mcrypt_module_open in -lmcrypt... yes

checking for MSSQL support via FreeTDS... no

checking for MySQL support... yes

checking for specified location of the MySQL UNIX socket... no

checking for mysql_close in -lmysqlclient... no

checking for mysql_error in -lmysqlclient... no

configure: error: mysql configure failed. Please check config.log for more information.

 

전 버전 5.4.20 에서 사용한 컴파일옵션 그대로 했는데, 안되네요.

왜 그런걸까요?

1 답변


수정됨
0 투표

저도 같은 경험을 했었습니다.

아래와 같이 --with-libdir=lib64 옵션을 더 추가해줬더니 컴파일에 문제가 없었어요.

[root@localhost php-5.4.31]# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --with-gd --with-freetype-dir=/usr/local/freetype --with-zlib --enable-sockets --enable-gd-native-ttf --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --enable-sigchild --with-gettext --enable-mbstring --enable-inline-optimization --enable-bcmath --enable-shmop --enable-calendar --enable-ftp --with-gdbm --with-iconv --enable-mbregex --with-imap-ssl --with-openssl --with-curl --enable-soap --with-mcrypt=/usr/local --with-mysqli=/usr/local/mysql/bin/mysql_config --with-kerberos --enable-zip --with-libdir=lib64

 

CentOS 6.5 64bit

error: Cannot find libmysqlclient under /usr/local/mysql.

Note that the MySQL client library is not bundled anymore!

만약 위와 같은 오류가 발생한다면 아래 추가 작업을 해주시면 됩니다. 

# cd /usr/local/mysql

# ln -s lib lib64

 

도움이 되었습니다.^^^
구로역 맛집 시흥동 맛집
이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.
add
...