ld: library not found for -lltdl

MacでPHP5.3.24をインストールしようとしたらコンパイル時に以下のエラーが発生した。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
/var/tmp/php-build/source/5.3.24/Zend/zend_objects.c:96: warning: assignment discards qualifiers from pointer target type
/var/tmp/php-build/source/5.3.24/Zend/zend_object_handlers.c: In function ‘zend_get_property_guard’:
/var/tmp/php-build/source/5.3.24/Zend/zend_object_handlers.c:301: warning: passing argument 3 of ‘zend_unmangle_property_name’ from incompatible pointer type
/var/tmp/php-build/source/5.3.24/Zend/zend_object_handlers.c:301: warning: passing argument 4 of ‘zend_unmangle_property_name’ from incompatible pointer type
/var/tmp/php-build/source/5.3.24/Zend/zend_object_handlers.c:304: warning: assignment discards qualifiers from pointer target type
/var/tmp/php-build/source/5.3.24/sapi/apache2handler/sapi_apache2.c: In function ‘php_handler’:
/var/tmp/php-build/source/5.3.24/sapi/apache2handler/sapi_apache2.c:675: warning: format ‘%u’ expects type ‘unsigned int’,  but argument 3 has type ‘size_t’
ld: library not found for -lltdl
collect2: ld returned 1 exit status
make: *** [libs/libphp5.bundle] Error 1
-----------------------------------------

libtoolのインストール

昔Linuxで似たエラーを経験したことがあったので「libtool」をいれる。

1
$ brew install libtool

これで無事インストールができた。このブログ全然コード書いてないですね。

Comments