- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
编译模块:切换到ext模块目录:8 p; y# m7 S4 V/ n. J
cd /usr/src/php-8.3.1/ext/mysqli
- g0 _1 y7 `$ J! U ]9 E) ^! K" C切换到myqlli目录:
( r; X, j2 k8 l2 I$ H0 H" @, C) g& B
7 K' Q) l+ _0 e+ W4 |! U4 T执行:
5 o) p: }2 z+ x/ c9 X. I/usr/local/php/bin/phpize
; D2 g' {6 {- j$ ]( h7 Z+ b" r* g- DConfiguring for:; j; u4 z& t( T+ Z* c
PHP Api Version: 202308311 f% S1 T. Z4 j2 ]! r) Y8 ^
Zend Module Api No: 20230831
! s; t. U2 r6 _5 i+ ~( U, `Zend Extension Api No: 420230831" o% Z; S, I, a
% O5 l2 q" G' J1 x" b( a# h
要检查config.m4文件 没有就复制一个吧:
' G- z9 K& a; e& j$ g, n% t& t) L6 ?& w. j" H \7 [) _
2 z4 t' M& w2 Q a; g通过configure配置php:1 O5 h& @0 t8 f& Q8 H v; b
./configure --with-php-config=/usr/local/php/bin/php-config
6 M* N# N6 Q/ T. S9 Y( L9 X) v) H3 X
编译并安装:
4 |8 w( H7 ^% p9 J, O3 c+ jmake && make install & v; u9 S3 R+ g& {/ o. }' M6 E s* d( |5 v0 J
! W5 `6 m) v$ S+ Q& ~
/bin/sh /usr/src/php-8.3.1/ext/mysqli/libtool --mode=link cc -shared -I/usr/src/php-8.3.1/ext/mysqli/include -I/usr/src/php-8.3.1/ext/mysqli/main -I/usr/src/php-8.3.1/ext/mysqli -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -D_GNU_SOURCE -o mysqli.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/src/php-8.3.1/ext/mysqli/modules mysqli.lo mysqli_api.lo mysqli_prop.lo mysqli_nonapi.lo mysqli_report.lo mysqli_driver.lo mysqli_warning.lo mysqli_exception.lo mysqli_result_iterator.lo
) v/ r( t w: | a, }% z9 T* Icc -shared .libs/mysqli.o .libs/mysqli_api.o .libs/mysqli_prop.o .libs/mysqli_nonapi.o .libs/mysqli_report.o .libs/mysqli_driver.o .libs/mysqli_warning.o .libs/mysqli_exception.o .libs/mysqli_result_iterator.o -Wl,-soname -Wl,mysqli.so -o .libs/mysqli.so
8 _4 g0 b/ `& Q: o; Icreating mysqli.la
( r$ \' C" @( Q: |5 a(cd .libs && rm -f mysqli.la && ln -s ../mysqli.la mysqli.la)0 D/ H+ F, e; p8 H& `' [
/bin/sh /usr/src/php-8.3.1/ext/mysqli/libtool --mode=install cp ./mysqli.la /usr/src/php-8.3.1/ext/mysqli/modules/ W% ^' U: W5 E! T7 k7 z# m, M H ^
cp ./.libs/mysqli.so /usr/src/php-8.3.1/ext/mysqli/modules/mysqli.so
; }% X- y& G, j! A' l# wcp ./.libs/mysqli.lai /usr/src/php-8.3.1/ext/mysqli/modules/mysqli.la
9 ^& V0 t; d- XPATH="$PATH:/sbin" ldconfig -n /usr/src/php-8.3.1/ext/mysqli/modules
- W2 @8 r/ K/ k [% o+ q5 r3 }----------------------------------------------------------------------- J [/ v1 i8 j
Libraries have been installed in:0 t8 f( l8 Z( i
/usr/src/php-8.3.1/ext/mysqli/modules
) v a9 Q5 D+ q0 ?' j, |
. }% V8 c% P/ L. I# _4 `; @If you ever happen to want to link against installed libraries
, W, [3 N9 F2 t3 y- }" ]$ ~7 oin a given directory, LIBDIR, you must either use libtool, and
: x! i7 [: x' R1 x. T1 hspecify the full pathname of the library, or use the `-LLIBDIR'
* H5 A! \2 G- F1 L" n6 `flag during linking and do at least one of the following:
7 {4 a3 i# c7 h; c1 W2 @/ D - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
# Q" s7 G: l( f; @: | during execution/ t( |- }6 t, g3 Z9 x" f) ~9 z0 a
- add LIBDIR to the `LD_RUN_PATH' environment variable
9 v& _3 t; Z6 c% d* ] during linking8 }5 c9 b) |, Y4 y8 S8 e
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag/ f6 W2 U9 t1 Q6 ^" D% v8 {& I' }
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
& A+ l. J6 [1 A# t/ d. j i
7 S& N+ `% G/ c6 T$ l( q' MSee any operating system documentation about shared libraries for7 w; s" k( o: ?+ j% \. T" C
more information, such as the ld(1) and ld.so(8) manual pages.
9 _6 R9 y7 r6 D/ y----------------------------------------------------------------------
5 K/ L; J2 w, h) R4 A& Y) W b
( w& g# Z" r6 u( |' JBuild complete.1 o; B; k, ^5 l; c9 U2 u% ^. c
Don't forget to run 'make test'.
& `+ S: Q) \: ]6 c; p5 ], x7 t
" m0 E4 z! o4 h. y5 ^( N( E/ \Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20230831/1 s# T; V" h# B
Installing header files: /usr/local/php/include/php/
! P9 ], {: x4 X/ N0 ?8 ^) q( b9 V0 Z+ K" a, v- y
去对应的目录检查文件:- O+ X, p- u" P/ \2 C0 r
' H( o) q9 S) x6 G+ a
[root@ipam2 no-debug-zts-20230831]# ls. s7 i7 [8 r1 u
mysqli.so
1 h/ k& L9 Z0 Z+ ^5 g( |; b, e! I M
, X% b4 l+ i1 q5 p+ m |
|