Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1860396
  • 博文数量: 117
  • 博客积分: 2559
  • 博客等级: 少校
  • 技术积分: 4385
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-13 20:08
个人简介

作为初学者,要想取得进步,成为高手,首先应该了解自己的不足之处.

文章分类

全部博文(117)

文章存档

2014年(1)

2013年(25)

2012年(13)

2011年(77)

2010年(1)

分类: 系统运维

2011-08-10 13:54:10

在linux中编译php 5.3,出现如下错误

lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt   -o sapi/fpm/php-fpm
ext/standard/dns.o: In function `php_parserr':
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:418: undefined reference to `__dn_expand'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:468: undefined reference to `__dn_expand'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:652: undefined reference to `__dn_expand'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:674: undefined reference to `__dn_expand'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:513: undefined reference to `__dn_expand'
ext/standard/dns.o:/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:519: more undefined references to `__dn_expand' follow
ext/standard/dns.o: In function `zif_dns_check_record':
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:393: undefined reference to `__res_nsearch'
ext/standard/dns.o: In function `zif_dns_get_mx':
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:925: undefined reference to `__res_nsearch'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:936: undefined reference to `__dn_skipname'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:943: undefined reference to `__dn_skipname'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:956: undefined reference to `__dn_expand'
ext/standard/dns.o: In function `zif_dns_get_record':
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:808: undefined reference to `__res_nsearch'
/home/lianjie.ning/php-5.3.6/ext/standard/dns.c:825: undefined reference to `__dn_skipname'
collect2: ld returned 1 exit status
make: *** [sapi/fpm/php-fpm] Error 1


找到Makefile文件,在EXTRA_LIBS最后添加-lresolv
EXTRA_LIBS = -lcrypt -lcrypt -lrt -lmysqlclient -lrt -lm -ldl -lnsl -lrt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -
lxml2 -lz -lm -lcrypt -lresolv


参考:
阅读(11614) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~