|
|
php 编译enchant 模块报错解决configure: error: Package requirements (enchant >= 1.4.2) were not met: No package 'enchant' found
1 l+ d2 h1 ~) r6 R4 f
' W( D* }2 R2 _$ \# k解决过程:
& V* u% J' |0 X2 m# i[root@ipam enchant]# pkg-config --modversion enchant+ ?; p/ m4 b, _8 v! _
Package enchant was not found in the pkg-config search path.$ N# w {* w8 j. U/ R) C
Perhaps you should add the directory containing `enchant.pc'2 p# B9 i% M" d9 M5 K
to the PKG_CONFIG_PATH environment variable0 z j5 K9 M8 y
No package 'enchant' found
7 a3 k5 {- A0 y6 |[root@ipam enchant]# pkg-config --modversion enchant-2) s. s3 |/ \+ x3 L
Package enchant-2 was not found in the pkg-config search path.
- E0 H* E! ~2 q* v$ NPerhaps you should add the directory containing `enchant-2.pc'/ y# h- Z0 d9 G( s6 W h N' Q8 N
to the PKG_CONFIG_PATH environment variable+ R9 ?$ [, \7 a% _! e
No package 'enchant-2' found% L. z/ f4 c: u* c- ]( I
[root@ipam enchant]# pacman -Ss enchant - ]9 _$ f- C) b* [( H% Q( y
-bash: pacman: command not found
4 |4 l I v* V[root@ipam enchant]# yum install -y enchant ( ~7 Y1 n; y3 m C
Loaded plugins: fastestmirror) ?0 ]( K( T, J1 i% L
Loading mirror speeds from cached hostfile
# f% V3 f8 U# I5 FResolving Dependencies5 {5 n$ F2 C; K* x0 p
--> Running transaction check8 u0 G [* s J' b; Q1 [
---> Package enchant.x86_64 1:1.6.0-8.el7 will be installed
$ I. j& K8 s# [4 ^! `5 B--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:enchant-1.6.0-8.el7.x86_64
" g5 r$ ]7 X7 E( ~ m8 c8 c--> Running transaction check
, k) N7 W4 ~& Y% r! q# H, [---> Package hunspell.x86_64 0:1.3.2-16.el7 will be installed: r# ?/ U. H2 C8 K
--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-16.el7.x86_64
% H, T( n: o/ t/ H* o+ o--> Running transaction check
+ ? I. g7 t0 q1 I; i. |; t---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
8 q7 x6 X' \6 O8 G3 c0 y$ c--> Finished Dependency Resolution
' `3 c8 H9 z" z7 q! c- X) A0 W: X
- w1 Q( A! J; ?9 B/ a9 yDependencies Resolved3 L( R u _( e& B. B, g) v
* b$ J1 }4 a7 C=============================================================================================================================================================================
% I: S$ I+ S# d" E6 \6 ~& b( z* e; j Package Arch Version Repository Size$ W% f$ ?/ B( ]" b0 n2 Y& G2 F7 k- ?
=============================================================================================================================================================================& h1 z$ s& g) a/ M. b1 c
Installing:
& K+ O6 T4 t5 e D enchant x86_64 1:1.6.0-8.el7 base 55 k% T! J& D: R% o2 Y0 j5 o1 y) u2 i$ P
Installing for dependencies:# _* K/ |& {) k- E/ u- Q
hunspell x86_64 1.3.2-16.el7 base 223 k
! A1 _1 }! U! i/ M hunspell-en-US noarch 0.20121024-6.el7 base 190 k
: _" ?1 @/ U% `+ q: x/ F5 U+ t4 o+ M2 Z. Z8 {9 g0 C. e' z
Transaction Summary. x7 b+ T/ u( o8 a& Y4 N
=============================================================================================================================================================================
0 W* Z( Y8 V" H: s: `Install 1 Package (+2 Dependent packages)( O I0 o7 x% C- s+ }9 @) a7 j
) K& \, _" X+ C$ p+ ~Total download size: 468 k1 K: \+ v% b# q% p/ ?, i. g. g, g+ X
Installed size: 1.2 M8 y: I( X' K( B T1 i# N
Downloading packages:
0 y4 C) R( l( [2 }% V(1/3): hunspell-1.3.2-16.el7.x86_64.rpm | 223 kB 00:00:00 $ M+ g9 Q. X1 M6 V. s; k. j6 X0 h6 h+ O
(2/3): enchant-1.6.0-8.el7.x86_64.rpm | 55 kB 00:00:00
" O) R1 L( P% G) {4 p& M) x(3/3): hunspell-en-US-0.20121024-6.el7.noarch.rpm | 190 kB 00:00:00 $ r" b7 L! G- y) h& r6 Z0 y
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 g3 R6 A9 w5 Q1 \Total 3.9 MB/s | 468 kB 00:00:00 . }# J5 f. b! F9 r
Running transaction check
/ }5 q8 M# s' L8 |+ \9 J9 XRunning transaction test, C! L( y, [$ b- H) r
Transaction test succeeded
$ ], w8 @; f4 @5 D3 ]2 R) F8 y, y! ?Running transaction
/ X, K% _6 H* U9 e1 c Installing : hunspell-1.3.2-16.el7.x86_64 1/3
5 d/ a/ \9 ]/ L- O) P Installing : hunspell-en-US-0.20121024-6.el7.noarch 2/3 8 C" a. Z# M5 C* Q2 x5 n
Installing : 1:enchant-1.6.0-8.el7.x86_64 3/3
/ B- {9 }* r2 Q' Z1 X4 }; X* h Verifying : hunspell-en-US-0.20121024-6.el7.noarch 1/3
}" ^/ c% e1 I/ w7 E7 @ Verifying : hunspell-1.3.2-16.el7.x86_64 2/3 8 d5 |/ Q( f w% h6 A5 l
Verifying : 1:enchant-1.6.0-8.el7.x86_64 3/3
: G5 ^5 v0 x# @) j3 a! o6 {; n9 I9 k3 ]0 z& D& ^
Installed:
. ?: @- ~4 k. b6 P p enchant.x86_64 1:1.6.0-8.el7 ' w, Q, C4 m$ n4 {4 Y8 R! {
) V" V0 R7 f5 |0 _5 ?- o7 w* uDependency Installed:7 E) y$ j! \8 Z0 X- q) {! N! k
hunspell.x86_64 0:1.3.2-16.el7 hunspell-en-US.noarch 0:0.20121024-6.el7
[& M7 l, Z* I, P U$ O8 F. J
Complete!/ |$ I8 l7 x( C1 l
2 g8 G8 T' x6 K2 o' r' ^" p6 C安装enchant
. r( Z3 D* n7 A[root@ipam enchant]# yum install -y enchant ! }$ B% K1 S& A/ q( u3 W& {
Loaded plugins: fastestmirror) D7 g6 s7 M2 G* z2 p# A- y* a
Loading mirror speeds from cached hostfile% y0 v8 `2 i, s1 q$ W5 x
Package 1:enchant-1.6.0-8.el7.x86_64 already installed and latest version* f- ]) \1 ~& g
Nothing to do) b8 {1 E7 d6 z( b) z
[root@ipam enchant]# pkg-config --modversion enchant
0 T1 v6 O# u1 `/ X. iPackage enchant was not found in the pkg-config search path.0 O. i# _, ?) C3 Q0 v1 B
Perhaps you should add the directory containing `enchant.pc'
! P7 U! G7 l1 {1 Y0 t! ^8 w7 g! jto the PKG_CONFIG_PATH environment variable
K" m" O9 W* D8 `2 \0 W& T# HNo package 'enchant' found
$ V; H. G3 @% F- a- r[root@ipam enchant]# pkg-config --modversion enchant
# E/ c; \. x( F- f" {7 rPackage enchant was not found in the pkg-config search path.$ U% L* \. C; l& x6 x
Perhaps you should add the directory containing `enchant.pc'
0 f3 O# z8 S+ O- vto the PKG_CONFIG_PATH environment variable
; W7 C# Z' z2 G+ @+ }( c qNo package 'enchant' found
7 L+ g- f; j3 J$ C7 ]: [. t
' Q( A) c. n/ P. P2 i a' d6 S安装enchant-devel插件:3 j; D. p6 X4 R; y
' c0 x' A, N `8 @3 _* J
[root@ipam enchant]# yum install -y enchant-devel
% G, m C3 N% Y1 u6 ?1 ?' VLoaded plugins: fastestmirror5 e5 d+ n2 ~) J
Loading mirror speeds from cached hostfile* T! o% y1 D5 k G
Resolving Dependencies
- O) l) B9 ]& W7 E) h--> Running transaction check. w" y- }; j( b$ B) Z/ g
---> Package enchant-devel.x86_64 1:1.6.0-8.el7 will be installed; l1 Y! N1 W; ]/ R. P
--> Processing Dependency: pkgconfig(gmodule-no-export-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64* y2 g' R9 Q- `0 ^; d. h
--> Processing Dependency: pkgconfig(glib-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64
: R1 X' ]6 P* u( g, _2 H--> Processing Dependency: glib2-devel for package: 1:enchant-devel-1.6.0-8.el7.x86_64
: ~& I& D9 u6 [! J--> Running transaction check
1 c- U d- S" @7 g0 k8 ]. C% j---> Package glib2-devel.x86_64 0:2.56.1-9.el7_9 will be installed6 e7 O3 F/ q, N8 D9 P/ H
--> Processing Dependency: glib2(x86-64) = 2.56.1-9.el7_9 for package: glib2-devel-2.56.1-9.el7_9.x86_64
- r4 ]# O5 Q8 R, |" Z--> Running transaction check) g. g2 c% E* s3 `& H U# L; H5 p
---> Package glib2.x86_64 0:2.56.1-7.el7 will be updated
2 Z2 _0 q8 V% j. k, z! v---> Package glib2.x86_64 0:2.56.1-9.el7_9 will be an update
9 E+ W2 P# J$ O5 E& C* P--> Finished Dependency Resolution
. G5 n }& Z+ W Z0 R8 D+ }" q1 z2 Z' x
Dependencies Resolved
# m% X0 P% r' E \ N4 n6 E
! u( F( ^, e* N7 ]=============================================================================================================================================================================
- {# X5 }( ?3 P" \2 R) M Package Arch Version Repository Size
7 Z" d, t9 I" L* @3 u, ^: c& v0 @+ U=============================================================================================================================================================================
r8 k# ?4 N' ]- [+ }+ A6 nInstalling:
% `, L: L, ~: E! W3 p1 o( x) @- Y enchant-devel x86_64 1:1.6.0-8.el7 base 13 k
! \6 k% C. R' HInstalling for dependencies:
5 Z* [% _ M8 k8 E glib2-devel x86_64 2.56.1-9.el7_9 updates 453 k
) |3 `! K/ K3 \0 _# n: q6 RUpdating for dependencies:
4 x+ C6 U0 u" e glib2 x86_64 2.56.1-9.el7_9 updates 2.5 M2 R# D- K& q {2 B
$ O% b* t( R7 R+ D9 [+ aTransaction Summary5 X% b8 O K0 {; V8 q
=============================================================================================================================================================================0 S0 H4 A/ V; [9 r: j# x
Install 1 Package (+1 Dependent package)
4 O. \5 ]; F. G9 C& w! O( YUpgrade ( 1 Dependent package)
0 g+ K8 w$ q% k0 X; y, N* } e/ y/ B1 ?2 \/ d( R0 C: Y( ^, h
Total download size: 2.9 M
7 L; D7 K" [, C3 Q) Z/ HDownloading packages:/ ~+ X6 u1 h5 Z$ i$ Y! O9 }0 ?
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
6 |6 K( u8 g& M3 Q# g, ~1 t(1/3): enchant-devel-1.6.0-8.el7.x86_64.rpm | 13 kB 00:00:00 |9 [: O4 ]) ^" g( b5 X( |
(2/3): glib2-devel-2.56.1-9.el7_9.x86_64.rpm | 453 kB 00:00:00
7 p& J7 l `- Z$ T/ M(3/3): glib2-2.56.1-9.el7_9.x86_64.rpm | 2.5 MB 00:00:00 ( K+ j' l4 {( U. u$ q
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
9 j1 N+ H# J# b/ @0 PTotal 28 MB/s | 2.9 MB 00:00:00 ) Y2 Y |/ C! B( L/ ^& Z$ x' S+ d4 E
Running transaction check% k; q6 z6 m9 }* p9 {
Running transaction test( o1 N) D2 |* [; P" Z6 A
Transaction test succeeded5 r+ D! S8 U4 o% |" B0 a
Running transaction
, x* t. O5 m$ x7 I) t+ Q Updating : glib2-2.56.1-9.el7_9.x86_64 1/4
2 j' s7 S4 u0 c$ w3 r Installing : glib2-devel-2.56.1-9.el7_9.x86_64 2/4
) ~9 z4 q; {" D4 V4 W8 [) i9 s Installing : 1:enchant-devel-1.6.0-8.el7.x86_64 3/4 4 R/ H" U6 ]+ }+ d$ {3 ?
Cleanup : glib2-2.56.1-7.el7.x86_64 4/4 " i7 s8 ]6 \6 z5 M% w
Verifying : 1:enchant-devel-1.6.0-8.el7.x86_64 1/4
* o: v, m! W" ^3 e Verifying : glib2-2.56.1-9.el7_9.x86_64 2/4 9 k6 I; [, P7 Z1 b3 D; v6 X K2 f
Verifying : glib2-devel-2.56.1-9.el7_9.x86_64 3/4
8 F7 t. W. r) Q) N) ?; D Verifying : glib2-2.56.1-7.el7.x86_64 4/4 3 @: ]0 H. G. F
# t, L& t3 L4 N8 j
Installed:
) ]0 _! Y2 A' \+ n$ x enchant-devel.x86_64 1:1.6.0-8.el7 % Z" Q1 e- D3 `( Q$ [
3 c* t/ S/ z+ c- j4 p" T
Dependency Installed:1 |; J! H; k/ P! q
glib2-devel.x86_64 0:2.56.1-9.el7_9 5 }5 f1 ~ [7 y: Z
$ w. x3 q: b& F8 Q h- _Dependency Updated:
$ g$ e* x$ g/ u' w; E glib2.x86_64 0:2.56.1-9.el7_9
. }+ A; s1 v( @$ ~7 Z* b( o: n# M% R, `$ o9 K6 z# p0 H
Complete!5 W+ [3 z$ g# c( X6 H3 j3 @7 G
2 @& T, P3 F/ J4 k检查版本:" h, O! } ?# J! y# R
[root@ipam enchant]# pkg-config --modversion enchant+ y0 v& O( Q# u" Z' S5 }( p# ^! r5 I
1.6.0
( y. N$ t+ ~) `5 T! v8 g" a4 I: L7 f+ X9 @
" G" P9 i1 s) V Q* ^ r# `1 t
再次编译:成功解决:
. V0 k3 s9 }) o& h" G" a[root@ipam enchant]# ./configure --with-php-config=/usr/local/php/bin/php-config
& ~' ~+ V+ P2 E7 L, Gchecking for grep that handles long lines and -e... /bin/grep
8 ] o1 D% ]9 I1 Tchecking for egrep... /bin/grep -E
& `1 m; R p$ q" K. c" V8 Schecking for a sed that does not truncate output... /bin/sed
0 J4 t% s; q; b8 V2 u) ^# [- R* Y9 Ichecking for pkg-config... /bin/pkg-config
3 s9 k6 a5 R; P, m' V0 \" V$ x1 lchecking pkg-config is at least version 0.9.0... yes
8 K, \6 ]' A/ k4 dchecking for cc... cc! g1 t1 L3 }! G" p/ u
checking whether the C compiler works... yes# [9 y Y6 S3 _$ d
checking for C compiler default output file name... a.out4 |/ ]% S$ e8 F! ?7 b
checking for suffix of executables... 7 u `2 Q" t! d; P1 C- o2 p
checking whether we are cross compiling... no+ a, l* S, N( B. e
checking for suffix of object files... o
* {& T$ z& I! }4 U( f! _; Pchecking whether we are using the GNU C compiler... yes
' ^- a% s7 @: rchecking whether cc accepts -g... yes
$ y# [% G) K& Z3 ]checking for cc option to accept ISO C89... none needed% O' g) @3 P8 Z" G$ d4 F
checking how to run the C preprocessor... cc -E) L: p5 w2 n5 U0 u* o [( \: B" c9 c
checking for icc... no1 O C' Y9 ~$ H" [( g2 U% |
checking for suncc... no
% p/ R: `5 S9 `6 Fchecking for system library directory... lib
2 V/ r% _& {1 H' m- A' h! l6 C2 Fchecking if compiler supports -Wl,-rpath,... yes
! n. e' f5 E- C* t/ y9 K5 b* Ychecking build system type... x86_64-pc-linux-gnu
! c, N' X2 r. E q$ gchecking host system type... x86_64-pc-linux-gnu
1 ], y, X# I' O; E# ^6 _checking target system type... x86_64-pc-linux-gnu# z9 {. [2 [ d+ j' u0 `
checking for PHP prefix... /usr/local/php
, C) _4 j9 ^& J9 m6 v5 O3 Tchecking for PHP includes... -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
0 d3 S& p4 j0 x" [* fchecking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20230831! V; m2 Y4 j O
checking for PHP installed headers prefix... /usr/local/php/include/php
* ?" \" P5 W" [3 z% o( Uchecking if debug is enabled... no
6 x3 q6 O" @0 {, d1 N6 D% w6 Uchecking if zts is enabled... no
5 G* i8 Z) p5 ?* y! echecking for gawk... gawk
# q) q6 f V# x( Xchecking whether to build with Enchant support... yes, shared
/ b$ U+ ~& J7 y) ^) a# P7 schecking for enchant-2... no5 Y# I5 R0 s# n" X
configure: WARNING: libenchant-2 not found trying with old libenchant
! |7 l4 O8 k% {checking for enchant >= 1.4.2... yes- i# q. ]4 O2 @6 [" E
checking for enchant_get_version in -lenchant... yes
) i6 c# {' @3 M* l0 Ichecking for enchant_broker_set_param in -lenchant... yes5 y2 a6 O+ x( U+ N1 P
checking for a sed that does not truncate output... /bin/sed
" F5 `! \+ _8 {* cchecking for ld used by cc... /bin/ld: x9 j' {8 P8 P/ X' H+ r
checking if the linker (/bin/ld) is GNU ld... yes+ x6 p& {* y5 }) `
checking for /bin/ld option to reload object files... -r/ p' Y8 `7 G# ^
checking for BSD-compatible nm... /bin/nm -B
, m7 x/ T8 v! T V3 z/ Z/ Jchecking whether ln -s works... yes
* n- ?$ X% U/ cchecking how to recognize dependent libraries... pass_all, r3 t4 `! s/ x0 o
checking for ANSI C header files... yes
0 K. s/ B) l4 ochecking for sys/types.h... yes
0 B: ~1 I* E% b% b! y, rchecking for sys/stat.h... yes0 @3 K! T" K* {4 P' K
checking for stdlib.h... yes) w( i6 h4 w# p! V$ h9 K
checking for string.h... yes
8 p: g9 c% c# X+ r( pchecking for memory.h... yes3 \0 Z! K. c( o2 X1 Z4 t
checking for strings.h... yes
8 a% F G4 R# z: \1 M8 X+ q. Zchecking for inttypes.h... yes
) r# S( A* q5 ^) W$ }( nchecking for stdint.h... yes
3 H3 W' m3 \8 a, h6 Qchecking for unistd.h... yes9 ], d# w w5 F; W2 i8 d
checking dlfcn.h usability... yes
! f) o5 ~: l$ S- jchecking dlfcn.h presence... yes6 ?* c! G* y/ u
checking for dlfcn.h... yes
0 k. J& _/ h9 @: }checking the maximum length of command line arguments... 1572864
3 k1 x0 V$ n' P1 v: t/ X2 ichecking command to parse /bin/nm -B output from cc object... ok
9 Y8 l. h0 s" h9 u, gchecking for objdir... .libs+ B; t- U- D$ s6 O
checking for ar... ar
; r' O1 W7 i, m( X% X6 o5 Uchecking for ranlib... ranlib8 U! | Y3 J7 i" ~1 t% C
checking for strip... strip
* }$ H" }1 \3 f M( Jchecking if cc supports -fno-rtti -fno-exceptions... no5 u( Q4 o; D: I0 [6 N* j
checking for cc option to produce PIC... -fPIC
8 B) y% o1 [, R" wchecking if cc PIC flag -fPIC works... yes
! z3 e; C' i* S7 F' bchecking if cc static flag -static works... no" z4 r1 @4 `# T' H" ~3 J8 o2 N
checking if cc supports -c -o file.o... yes
/ G f+ x. K7 x& D L% d0 echecking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
% x1 G& R: B& n! R7 \7 \ d/ ^checking whether -lc should be explicitly linked in... no0 C3 G+ v$ u/ Z( O/ q% `6 j! d4 n1 w
checking dynamic linker characteristics... GNU/Linux ld.so
3 Z5 K# @# I* b' C" Schecking how to hardcode library paths into programs... immediate
2 r, w E8 d. p. r( E2 wchecking whether stripping libraries is possible... yes
/ \+ m3 _6 P3 y2 B& {2 Vchecking if libtool supports shared libraries... yes# b5 U3 m* i% i* l% G: a0 q
checking whether to build shared libraries... yes
7 o i# h. b/ Q$ K" B& [; n, C5 t3 _checking whether to build static libraries... no
5 r, \+ ?+ r8 U: {' U$ I1 g$ T; Q4 H
creating libtool
" P5 v3 P" x6 U# `: Happending configuration tag "CXX" to libtool
# H: V6 T6 `# ~7 S" R5 a: ?+ tconfigure: patching config.h.in
( a4 d9 h& c( v8 Z3 D. F+ ?configure: creating ./config.status
F+ W5 w) e1 C, k y Uconfig.status: creating config.h
. W% t$ l" n) u' Z
. F/ f8 H& h6 c1 A0 M |
|