找回密码
 注册
查看: 8|回复: 2

make: *** [sapi/phpdbg/phpdbg] Error 1 php 安装报错

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2024-1-12 17:00:00 | 显示全部楼层 |阅读模式
/bin/ld: ext/ldap/ldap.o: undefined reference to symbol 'ber_memfree'. W' l/ L0 p( ~
//usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line
% I4 Q6 H, B# P3 {3 tcollect2: error: ld returned 1 exit status7 d* ?* ?+ \0 Y# |* g
make: *** [sapi/phpdbg/phpdbg] Error 13 y; X' w7 U* _2 ~9 [
make: *** Waiting for unfinished jobs....
5 e: r. |' A% w8 g, G9 q- R  s/bin/ld: ext/ldap/ldap.o: undefined reference to symbol 'ber_memfree'2 P& c" ~7 ]$ `
//usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line
& b! h! s6 r& `2 u' ^collect2: error: ld returned 1 exit status/ f6 P; k3 X3 ?! t
make: *** [sapi/cli/php] Error 1
) d' P, V$ ?3 A! s1 m/bin/ld: ext/ldap/ldap.o: undefined reference to symbol 'ber_memfree'8 y( K* C+ E2 K6 O
//usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line5 r4 W) o! _- _9 @7 n8 U% m
collect2: error: ld returned 1 exit status2 c4 s) X4 r) T1 e- L0 G
/bin/ld: ext/ldap/ldap.o: undefined reference to symbol 'ber_memfree'+ n4 m" a; L( w0 {
//usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line
- e5 v+ y- ]5 s  s" U0 scollect2: error: ld returned 1 exit status
  I3 o' T& j% z0 S, \make: *** [sapi/fpm/php-fpm] Error 1" b, L) X* M5 t. x1 A( a5 z6 {# _, g
make: *** [sapi/cgi/php-cgi] Error 1
- J' r' B) c- P5 e; w) L! Q/ }5 A% o, a8 s& [" y

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2024-1-12 17:00:01 | 显示全部楼层
ln -s /usr/lib64/liblber.so /usr/lib/liblber.so  做链接

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2024-1-12 17:00:02 | 显示全部楼层
在PHP源码目录下 vi Makefile 打开文件,找到 EXTRA_LIBS 行,在行末添加 -llber 4 E/ C* d6 Y9 u2 A6 B1 W* e

: ]0 K* W  f8 Q' bEXTRA_LIBS = -lresolv -lreadline -lncurses -lrt -lldap -lgmp -lbz2 -lutil -lrt -lm -ldl -lxml2 -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lsqlite3 -lz -lcurl -lxml2 -lssl -lcrypto -lz -lpng15 -lonig -lsqlite3 -lxml2 -lxml2 -lxml2 -lxml2 -lxml2 -lxslt -lz -ldl -lm -lxml2 -lexslt -lxslt -lz -lm -lgcrypt -ldl -lgpg-error -lxml2 -lzip -lbz2 -lz -lz -lssl -lcrypto -llber
. C) O" X# M! {0 B& y8 ^5 z! T! \- }% B
保存退出再次make即可
* U( y( S' d/ }' J) R: I$ u6 h7 J2 Y  _; S2 y
make -j 12
+ u/ O7 [9 {+ e5 c/ p. O7 g3 o
4 i6 ?8 @" Y) b% N2 p; o' IBuild complete." \0 \/ f  G7 p; b! y
Don't forget to run 'make test'.
8 M0 N1 v9 |" J) Q
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 03:04 , Processed in 0.022465 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表