PHP 5.3.28을 만드는 중 오류가 발생했습니다.

PHP 5.3.28을 만드는 중 오류가 발생했습니다.

다음 명령을 사용하여 PHP 버전 5.3.28을 빌드하려고 했습니다.

[root@server php-5.3.28]# ./configure --with-apxs2=/usr/bin/apxs --with-libdir=lib64 --cache-file=./config.cache --prefix=/usr/local/php-5.3.28 --with-config-file-path=/usr/local/php-5.3.28/etc --disable-debug --with-pic --disable-rpath  --with-bz2 --with-curl --with-freetype-dir=/usr/local/php-5.3.28 --with-png-dir=/usr/local/php-5.3.28 --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr/local/php-5.3.28 --with-openssl --with-pspell --with-pcre-regex --with-zlib --enable-exif --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --with-unixODBC=/usr --enable-shmop --enable-calendar --with-libxml-dir=/usr/local/php-5.3.28 --enable-pcntl --with-imap --with-imap-ssl --enable-mbstring --enable-mbregex --with-gd --enable-bcmath --with-xmlrpc --with-ldap --with-ldap-sasl --with-mysql=/usr --with-mysqli --with-snmp --enable-soap --with-xsl --enable-xmlreader --enable-xmlwriter --enable-pdo --with-pdo-mysql --with-pear=/usr/local/php-5.3.28/pear --with-mcrypt --without-pdo-sqlite --with-config-file-scan-dir=/usr/local/php-5.3.28/php.d --enable-cgi

...

[root@server php-5.3.28]# make

...

_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_float.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/apache2handler/mod_php5.lo sapi/apache2handler/sapi_apache2.lo sapi/apache2handler/apache_config.lo sapi/apache2handler/php_functions.lo main/internal_functions.lo -lcrypt -lc-client -lexslt -lcrypt -laspell -lpspell -lmysqlclient -lmcrypt -lltdl -lldap -llber -lcrypt -lpam -lgmp -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lmysqlclient -lz -lm -lrt -lssl -lcrypto -ldl -lodbc -lmysqlclient -lz -lm -lrt -lssl -lcrypto -ldl -lxml2 -lz -lm -ldl -lnetsnmp -lrt -lssl -lssl -lcrypto -lm -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxslt -lxml2 -lz -ldl -lm -lrt -lcrypt  -o libphp5.la
/bin/ld: cannot find -lltdl
collect2: error: ld returned 1 exit status
make: *** [libphp5.la] Error 1
[root@server php-5.3.28]# 

나는 또한 시도했다

[root@server php-5.3.28]# make clean

성공하지 못했습니다.

내 OS 버전:

[root@server php-5.3.28]# cat /etc/redhat-release 
Fedora release 18 (Spherical Cow)

64비트 아치. 다음과 같은 라이브러리가 있습니다.

[root@server php-5.3.28]# rpm -qa |grep -i ltdl
libtool-ltdl-2.4.2-7.fc18.x86_64
libtool-ltdl-2.4.2-7.fc18.i686

make 오류 문제를 어떻게 해결할 수 있나요?

나는 성공하지 못한 채 이 솔루션을 시도했습니다.

ldconfig -p 명령 출력 | 아래의 grep ltdl:

[root@server php-5.3.28]# ldconfig -p | grep ltdl
        libltdl.so.7 (libc6,x86-64) => /lib64/libltdl.so.7
        libltdl.so.7 (libc6) => /lib/libltdl.so.7
[root@server php-5.3.28]#

/usr/local/lib 아래에 없습니다. 어쨌든 /lib/libltdl.so.7을 추가해야 합니까?

파일을 확인했습니다.

[root@server php-5.3.28]# ls -alh /lib64/libltdl.so.7
lrwxrwxrwx 1 root root 16 Feb 14  2013 /lib64/libltdl.so.7 -> libltdl.so.7.3.0
[root@server php-5.3.28]#

/etc/ld.so.conf 파일을 편집했습니다.

[root@server php-5.3.28]# more /etc/ld.so.conf
include ld.so.conf.d/*.conf
/lib/libltdl.so.7
[root@server php-5.3.28]#

그리고 실행되었습니다:

[root@server php-5.3.28]# ldconfig

그것은 나에게 도움이 되지 않았습니다. make 중에 동일한 오류 메시지가 나타납니다.

... Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_ts_hash.lo Zend/zend_stream.lo Zend/zend_iterators.lo Zend/zend_interfaces.lo Zend/zend_exceptions.lo Zend/zend_strtod.lo Zend/zend_gc.lo Zend/zend_closures.lo Zend/zend_float.lo Zend/zend_objects.lo Zend/zend_object_handlers.lo Zend/zend_objects_API.lo Zend/zend_default_classes.lo Zend/zend_execute.lo sapi/apache2handler/mod_php5.lo sapi/apache2handler/sapi_apache2.lo sapi/apache2handler/apache_config.lo sapi/apache2handler/php_functions.lo main/internal_functions.lo -lcrypt -lc-client -lexslt -lcrypt -laspell -lpspell -lmysqlclient -lmcrypt -lltdl -lldap -llber -lcrypt -lpam -lgmp -lfreetype -lpng -lz -ljpeg -lcurl -lbz2 -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lcurl -lxml2 -lz -lm -ldl -lssl -lcrypto -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lmysqlclient -lz -lm -lrt -lssl -lcrypto -ldl -lodbc -lmysqlclient -lz -lm -lrt -lssl -lcrypto -ldl -lxml2 -lz -lm -ldl -lnetsnmp -lrt -lssl -lssl -lcrypto -lm -lxml2 -lz -lm -ldl -lcrypt -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxml2 -lz -lm -ldl -lxslt -lxml2 -lz -ldl -lm -lrt -lcrypt  -o libphp5.la
/bin/ld: cannot find -lltdl
collect2: error: ld returned 1 exit status
make: *** [libphp5.la] Error 1

답변1

또는 파일이 ld필요합니다 ( 숫자 가 나와 있지 않음)..so.a.so.[0-9]*

rpm 기반 배포판에서는 일반적으로 이름에 "devel"이 포함된 패키지에 보관됩니다.

나는 "ltdl devel rpm"을 검색하여 다음을 찾았습니다.

http://rpmfind.net/linux/rpm2html/search.php?query=libtool-ltdl-devel

그게 당신에게 꼭 필요한 것임에 틀림없어요.

yum install libtool-ltdl-devel아마 할 것입니다.

답변2

출력 확인

ldconfig -p | grep ltdl

어쩌면 도서관을 찾지 못하는 것일 수도 있습니다. 그렇다면 lib가 설치된 위치를 확인하고 추가하십시오.

/etc/ld.so.conf

예. /usr/local/lib에 있으면 /usr/local/lib를 ld.so.conf에 추가하십시오.

그리고 달리다

ldconfig

다시 시도하고 실행해 보세요.

관련 정보