Redhat 5에서 PHP 5.2를 구성하고 빌드하는 데 문제가 있습니다.

Redhat 5에서 PHP 5.2를 구성하고 빌드하는 데 문제가 있습니다.

PHP 바이너리를 다운로드하고 다음 명령을 사용하여 동일한 빌드를 시도했습니다.

./configure --with-apxs2=/usr/sbin/apxs --with-mysql

하지만 mysql 클라이언트 라이브러리와 관련된 오류가 발생합니다.

checking for MySQL support... yes 
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!

mysql 클라이언트가 설치되어 있음을 확인했습니다.

$ yum list mysql*
Loaded plugins: rhnplugin, security
Installed Packages
MySQL-client-community.x86_64    5.1.48-1.rhel5   installed
MySQL-server-community.x86_64    5.1.48-1.rhel5   installed

답변1

~을 위한건축학패키지 항목도 필요 -devel하며 일반 패키지에는 런타임만 포함됩니다.

왜 PHP를 구축하려고 합니까? 이 배포판에서 제공하는 패키지에 어떤 문제가 있다고 생각하시나요? 이것버전오래되었을 수도 있지만 모든 보안 패치가 백포트되어 있다고 확신할 수 있습니다.

답변2

Google에서 여러 페이지를 검색한 결과 mysql-devel 패키지를 설치해야 한다는 것을 알았습니다.

$ rpm -ivh MySQL-devel-community-5.1.48-1.rhel5.i386.rpm

/usr/include/mysql 아래에 필요한 헤더 파일이 생성됩니다.

그런 다음 다음 명령을 실행합니다. $ ./configure --with-apxs2=/usr/sbin/apxs --with-mysql-dir=/usr/

오류가 해결되었습니다.

관련 정보