|
|
php 编译enchant 模块报错解决configure: error: Package requirements (enchant >= 1.4.2) were not met: No package 'enchant' found" {0 B8 ^4 n" Z& E
- l$ {0 R) N) o9 d( v
解决过程:9 B- R- X7 }2 d/ U5 p: N3 K
[root@ipam enchant]# pkg-config --modversion enchant
( L5 S7 G. v/ Y5 VPackage enchant was not found in the pkg-config search path.% _; f% P, d% b$ ?; D1 q6 Y+ s
Perhaps you should add the directory containing `enchant.pc'9 {1 D8 l j: o! X% B) e2 ~7 z# `( G
to the PKG_CONFIG_PATH environment variable
) P' [2 f5 S) r, h; }No package 'enchant' found* Z: T4 s$ _/ r& b
[root@ipam enchant]# pkg-config --modversion enchant-2! ?: U H( h" l. P: T: A! H
Package enchant-2 was not found in the pkg-config search path.
/ u. E9 H9 `) U, {% V& fPerhaps you should add the directory containing `enchant-2.pc'; u$ m, M2 s7 r+ G- C
to the PKG_CONFIG_PATH environment variable! M9 C7 r" E3 U1 a S7 y% L3 ]
No package 'enchant-2' found3 M1 H* _2 _; U( N( U
[root@ipam enchant]# pacman -Ss enchant
: b9 z; @1 P* X& s: ~+ b, a2 V-bash: pacman: command not found
. \0 |5 y" a% ~. V" s( O! ?1 O[root@ipam enchant]# yum install -y enchant
& X# q5 {0 U8 n- Q3 d- `$ x; pLoaded plugins: fastestmirror
" q' `1 I) i( s: }8 s7 hLoading mirror speeds from cached hostfile9 i% R4 o% k1 O0 e5 \. X8 h
Resolving Dependencies
, J& |# h2 I; A' A7 v! L--> Running transaction check
. _% o ]" R9 X---> Package enchant.x86_64 1:1.6.0-8.el7 will be installed8 s# ?; @. K2 C; R7 T
--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:enchant-1.6.0-8.el7.x86_64
0 F( c- q$ w2 J, K--> Running transaction check+ Y6 k# u1 r) o6 a$ Y
---> Package hunspell.x86_64 0:1.3.2-16.el7 will be installed* q B3 D9 A; l: H$ @& Y
--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-16.el7.x86_64
1 B) x+ j% `$ a* E3 e- t/ G6 Z--> Running transaction check
9 \9 l8 ?# S# O, W8 h& }, B* x---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
( Z( L2 m" q; i3 H; b5 F: H' P--> Finished Dependency Resolution( [! `, ?) w1 \( @7 K) e- F
# i% F. R$ z3 D* v3 X, X5 Z
Dependencies Resolved% o$ m v: J/ l r6 Y
4 @1 O8 K) ]' c: z' J4 w
=============================================================================================================================================================================% u: [# ]5 E- D/ o7 J/ c+ I; e
Package Arch Version Repository Size# j$ `: V# \: i
=============================================================================================================================================================================
8 r* Y- U7 q) ?- BInstalling:( X6 X( ^+ T: o+ m9 V
enchant x86_64 1:1.6.0-8.el7 base 55 k
, ^ N# T1 a4 J. x" @7 LInstalling for dependencies:
+ c _+ O7 N4 a9 v; y+ u* \1 M" X hunspell x86_64 1.3.2-16.el7 base 223 k: f1 t! n; u6 f: c
hunspell-en-US noarch 0.20121024-6.el7 base 190 k
\1 ^$ n2 p2 n
0 K" S/ J& k) T N( kTransaction Summary$ R2 f" e! M/ O9 K4 ?& y! }- y7 c( h
=============================================================================================================================================================================
V' ^) X1 a- }Install 1 Package (+2 Dependent packages): F6 { }2 `: p0 h, Q2 R2 C+ i) H5 e
8 E/ G: z. a [6 y! _: D: _9 OTotal download size: 468 k& V. S0 a0 Q8 L
Installed size: 1.2 M
$ [; j+ X: K: P4 c- h4 n rDownloading packages:5 x7 F! s+ H5 l2 K
(1/3): hunspell-1.3.2-16.el7.x86_64.rpm | 223 kB 00:00:00 + ^ b6 O/ T2 ^: [
(2/3): enchant-1.6.0-8.el7.x86_64.rpm | 55 kB 00:00:00
9 B; S( c$ [) B) U+ V9 G(3/3): hunspell-en-US-0.20121024-6.el7.noarch.rpm | 190 kB 00:00:00
8 Z% m) f, I/ m( a, f-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------( L# g* J3 S, r; W6 A0 U# e: V
Total 3.9 MB/s | 468 kB 00:00:00 5 d/ s. |& y' Z( w u. E2 V, H
Running transaction check
4 i) g6 Z; c+ A9 M1 y9 URunning transaction test
" |% R) B# [; s' j" J/ OTransaction test succeeded
, t; i/ o) r' r! LRunning transaction6 K+ K9 m0 r8 E% V
Installing : hunspell-1.3.2-16.el7.x86_64 1/3 ' U7 }& f W" }- K4 b4 a
Installing : hunspell-en-US-0.20121024-6.el7.noarch 2/3
* ~3 Z% x) r3 ~; K* b/ ` Installing : 1:enchant-1.6.0-8.el7.x86_64 3/3
' Z) R$ M P/ n8 F/ k- F" u$ } Verifying : hunspell-en-US-0.20121024-6.el7.noarch 1/3 7 r- v4 w$ U7 G% v3 Z. ^
Verifying : hunspell-1.3.2-16.el7.x86_64 2/3
) U' c! \" j1 [8 W1 j Verifying : 1:enchant-1.6.0-8.el7.x86_64 3/3
8 N5 s" Q# ~. H/ d' ?; ?+ Q$ L, Z1 G
Installed:1 \* l0 b' b2 }0 l- ?0 \
enchant.x86_64 1:1.6.0-8.el7
6 K: v6 S& g# J. c7 B/ o4 ~
8 B4 M, Z7 U7 X6 p3 mDependency Installed:
) n+ I7 P0 x+ X, [% U hunspell.x86_64 0:1.3.2-16.el7 hunspell-en-US.noarch 0:0.20121024-6.el7
6 y2 U- T/ P% a( h c' ^: M$ h* M2 C
Complete!+ |8 T- F& ~" x$ ~! r) `
5 l$ D" I2 F0 q: B+ x- f5 t3 M
安装enchant
: Z j% K' _0 {% X9 W[root@ipam enchant]# yum install -y enchant
2 Y+ |8 _8 L1 _Loaded plugins: fastestmirror
# m' g$ d; s Z4 j/ j) TLoading mirror speeds from cached hostfile+ R, n# l s. I* Y; b
Package 1:enchant-1.6.0-8.el7.x86_64 already installed and latest version; N. I# g4 S3 _7 I+ H
Nothing to do
7 n% i V; I( k' D[root@ipam enchant]# pkg-config --modversion enchant
# Q* }7 d8 \7 x& \) D, B$ k, @% APackage enchant was not found in the pkg-config search path.
+ N l8 |. r1 }( c7 Z/ QPerhaps you should add the directory containing `enchant.pc'1 P1 Y- R t5 ^- n: _- h
to the PKG_CONFIG_PATH environment variable1 ^9 O5 ^% ]& y- T: s) }' V
No package 'enchant' found( G* q' \0 ]) W
[root@ipam enchant]# pkg-config --modversion enchant8 k1 A0 i! U5 p, k7 o
Package enchant was not found in the pkg-config search path.
: N5 r& R: G; l% o- Y3 j: QPerhaps you should add the directory containing `enchant.pc'5 w) V4 P( L6 G& D
to the PKG_CONFIG_PATH environment variable
" {4 ]+ N8 j; u1 zNo package 'enchant' found
0 i1 O) s# x" y+ S/ ]+ S8 n3 N7 Z+ R) a4 g) D. ?
安装enchant-devel插件:7 I8 y Y; ^$ b6 F! _
: V0 s0 X1 W2 q. Q0 o0 y# J7 p[root@ipam enchant]# yum install -y enchant-devel m8 [4 k) e0 s8 b, q+ n6 w
Loaded plugins: fastestmirror
0 r# Q0 Q4 p8 {& MLoading mirror speeds from cached hostfile
! U# e: y; l6 {Resolving Dependencies1 \( J; S) j. e6 }) F
--> Running transaction check. H# K8 P% N( e! y' P; I2 s5 G
---> Package enchant-devel.x86_64 1:1.6.0-8.el7 will be installed
9 c- w6 P) x8 c7 Z# j; ~9 M--> Processing Dependency: pkgconfig(gmodule-no-export-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_648 ?- E3 m2 {& Y% t2 q
--> Processing Dependency: pkgconfig(glib-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64: B4 s" f' S2 [% J$ ]
--> Processing Dependency: glib2-devel for package: 1:enchant-devel-1.6.0-8.el7.x86_649 O' |/ A5 Q- g6 `2 x" M
--> Running transaction check
# V6 l) ]8 q' Q* e---> Package glib2-devel.x86_64 0:2.56.1-9.el7_9 will be installed
9 A6 E$ f3 \2 w--> Processing Dependency: glib2(x86-64) = 2.56.1-9.el7_9 for package: glib2-devel-2.56.1-9.el7_9.x86_64: D/ E! a4 O' a4 T; ?1 O" b1 a
--> Running transaction check
# a* `+ W/ F; f9 n7 _ N+ c---> Package glib2.x86_64 0:2.56.1-7.el7 will be updated3 S, ~9 k: Q- G8 S- L9 [
---> Package glib2.x86_64 0:2.56.1-9.el7_9 will be an update
* x& Z% v& f3 z1 {8 z5 l4 @--> Finished Dependency Resolution' j4 w9 P" W k
# c9 ]5 m8 ~2 |# M! ODependencies Resolved7 Q4 K6 n. P/ P3 L
' f! E; I; ~( l+ V
=============================================================================================================================================================================
- X% n, A3 X2 m# z! @ Package Arch Version Repository Size
K2 B% [3 C3 N: r=============================================================================================================================================================================$ N- R- D: k9 ?" L
Installing:( q& Q- h2 v& {* k
enchant-devel x86_64 1:1.6.0-8.el7 base 13 k2 J/ p* H# @5 W+ j0 m
Installing for dependencies:
0 o$ b; M' m, V( V/ { glib2-devel x86_64 2.56.1-9.el7_9 updates 453 k" ]7 U4 w. c1 F' v3 B5 A
Updating for dependencies:; q. f* R$ ?) K: |
glib2 x86_64 2.56.1-9.el7_9 updates 2.5 M
% s0 o1 \7 y6 P% n; E7 j9 d: {+ X8 X& s" U
Transaction Summary5 M% Z+ f& t5 H! t* _
=============================================================================================================================================================================8 _6 q% o1 @& ^7 ^# R+ q
Install 1 Package (+1 Dependent package)
1 S# a6 {4 S5 J u. v( @Upgrade ( 1 Dependent package)
$ f$ d2 C8 j, O
7 O) C3 r$ a5 L6 G0 `. N% RTotal download size: 2.9 M
8 U4 n# w( N/ E( LDownloading packages:7 [3 M7 y/ K3 [$ @3 t
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
2 Y. W8 ]% I* `* Q1 K/ {(1/3): enchant-devel-1.6.0-8.el7.x86_64.rpm | 13 kB 00:00:00 : O* k5 S8 L: O7 i1 ]3 f* B
(2/3): glib2-devel-2.56.1-9.el7_9.x86_64.rpm | 453 kB 00:00:00
& @8 D6 m) J, \* B(3/3): glib2-2.56.1-9.el7_9.x86_64.rpm | 2.5 MB 00:00:00 * @. V, I0 @+ w: l/ t
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
, }8 v" I# y5 X7 v# w7 [Total 28 MB/s | 2.9 MB 00:00:00
- |3 [# e7 Y9 h1 Q2 s- k; uRunning transaction check: G8 ^3 }! v6 p' c2 f- W
Running transaction test
1 b/ _ K7 U$ w6 ?0 rTransaction test succeeded
T4 K& {7 l3 t- H- {6 b, i KRunning transaction" h: J2 b) r0 x8 D+ e0 r7 {' C1 o
Updating : glib2-2.56.1-9.el7_9.x86_64 1/4 . S. L- ?0 \+ `
Installing : glib2-devel-2.56.1-9.el7_9.x86_64 2/4 ) h) w" ]$ ?. K T
Installing : 1:enchant-devel-1.6.0-8.el7.x86_64 3/4 , c. v& ` L+ l# V: _7 x2 P
Cleanup : glib2-2.56.1-7.el7.x86_64 4/4
7 ]% T O: R+ p6 z% w2 k Verifying : 1:enchant-devel-1.6.0-8.el7.x86_64 1/4
* W% N; d$ o7 n Verifying : glib2-2.56.1-9.el7_9.x86_64 2/4 6 m% ^( F9 ~% _" ]4 c& G- u# P. c# }0 Z
Verifying : glib2-devel-2.56.1-9.el7_9.x86_64 3/4
0 N. V' v. I# t4 J' G- Z Verifying : glib2-2.56.1-7.el7.x86_64 4/4 / k- @( L) u& E+ q0 x( W* m t
5 A" g% @; w% G
Installed:( @3 A9 g; [# W5 I
enchant-devel.x86_64 1:1.6.0-8.el7 / r% _/ O1 j( i! J
5 o3 k G3 K; \Dependency Installed:
0 ~7 p2 a: j( I) \2 p glib2-devel.x86_64 0:2.56.1-9.el7_9
) _2 o( r3 \8 T0 i/ c2 k4 a* n* m6 k/ i$ y5 U( m, |2 B6 B
Dependency Updated:" Z5 a5 g k$ k/ D: i
glib2.x86_64 0:2.56.1-9.el7_9
6 a; d/ l# l& [( Z- K/ @; R, C6 P, E% ]9 A! x2 O
Complete!3 g4 E' `4 E2 h; q
$ ]3 }; a* t' p检查版本:8 n. C5 B5 [3 A9 _6 G7 t! H n- _* g* O& F
[root@ipam enchant]# pkg-config --modversion enchant1 f3 Q, g& d7 W0 I6 R1 L
1.6.01 I2 w, o# x8 l6 E
: g3 L f, d, d/ \5 G- \0 [# b
- w t6 m. U# p0 |* |: T% G, B U" {
再次编译:成功解决:
) O6 \$ ?; R8 U- n/ M[root@ipam enchant]# ./configure --with-php-config=/usr/local/php/bin/php-config ( `& V2 H0 J4 i1 Z
checking for grep that handles long lines and -e... /bin/grep7 |& _/ N0 X' \5 w" z6 Y0 m
checking for egrep... /bin/grep -E
y( O! q+ f( M; Achecking for a sed that does not truncate output... /bin/sed( b( L, `" o2 ~2 g6 F1 X; X% s
checking for pkg-config... /bin/pkg-config' X% Y4 y# S. M* J- c( m
checking pkg-config is at least version 0.9.0... yes0 n' p- R0 W$ K; B3 G0 B
checking for cc... cc# U$ t) j6 ^. t3 t) f7 i
checking whether the C compiler works... yes0 }2 b9 ~6 \# R
checking for C compiler default output file name... a.out
% m! ^- L% Z* a5 l2 Z4 q( Xchecking for suffix of executables...
' v$ J1 F) ]. ]: ?4 Zchecking whether we are cross compiling... no
/ [( V8 \+ B4 s, q! [7 N# E5 n' ~* kchecking for suffix of object files... o
: P7 s1 M @" {* F1 @6 H4 Zchecking whether we are using the GNU C compiler... yes
; T/ L$ }0 c9 x( gchecking whether cc accepts -g... yes7 J. i4 l8 r5 u8 ~
checking for cc option to accept ISO C89... none needed
* e7 Y( |7 C, o6 H6 xchecking how to run the C preprocessor... cc -E: S2 b/ Z# M! \
checking for icc... no
" W+ F( Q8 K# [8 |9 b: }; kchecking for suncc... no, a" T$ y' z7 r& i8 f! f
checking for system library directory... lib
/ M! s* t3 f6 q1 M8 uchecking if compiler supports -Wl,-rpath,... yes- I- P8 r- d% |. S: H+ J
checking build system type... x86_64-pc-linux-gnu3 N$ Y7 I% t! E7 ]- L: n& H
checking host system type... x86_64-pc-linux-gnu, a$ N4 }7 E, M6 R/ q+ z
checking target system type... x86_64-pc-linux-gnu& F- {! B6 f9 M1 R) b! o" x( X# t
checking for PHP prefix... /usr/local/php
0 `7 L+ {, i: h) _checking 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+ s- N9 N8 z- B
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-202308318 x; u Q- o- c" m; S. d, N
checking for PHP installed headers prefix... /usr/local/php/include/php5 _- `! p* l8 {
checking if debug is enabled... no
5 d% j0 I. R) p* wchecking if zts is enabled... no" {5 K" v; }9 k0 f0 j4 ]
checking for gawk... gawk1 a$ e/ C$ |/ q: @4 b) Q
checking whether to build with Enchant support... yes, shared/ |. Z/ _; D2 {3 n( r0 s) ^
checking for enchant-2... no
' Y$ a J0 p# C3 ?5 U% U( rconfigure: WARNING: libenchant-2 not found trying with old libenchant
! E5 t5 O, A4 O6 kchecking for enchant >= 1.4.2... yes" r0 O8 E$ |: b& l; w3 _
checking for enchant_get_version in -lenchant... yes, a* D1 K2 L: D$ ?+ \
checking for enchant_broker_set_param in -lenchant... yes3 F% D! T* p% j) u
checking for a sed that does not truncate output... /bin/sed8 q; w/ J* }, ?" R$ S
checking for ld used by cc... /bin/ld: C" @$ D' r4 f% j8 N3 |+ A+ T' V+ F' M
checking if the linker (/bin/ld) is GNU ld... yes
3 v% Y) H1 \$ a/ `checking for /bin/ld option to reload object files... -r
! h2 |; y6 v6 nchecking for BSD-compatible nm... /bin/nm -B y1 P2 j$ R$ N r1 {
checking whether ln -s works... yes
( I b% Z( s5 u( gchecking how to recognize dependent libraries... pass_all
% \" R: U' n- t' G6 m- G8 M `( Ochecking for ANSI C header files... yes; D7 Z% A0 \) g+ Z& v
checking for sys/types.h... yes* V; R2 c" g' h* {" t
checking for sys/stat.h... yes
7 g) F: N! R( d3 qchecking for stdlib.h... yes
& |( m1 A+ ]; e- J* }* N* {checking for string.h... yes
+ H; R/ b% t; `0 [3 i& Z/ fchecking for memory.h... yes
; M2 j7 O* s- z' ]& Pchecking for strings.h... yes
Y: N9 _- Y" ?4 j; h8 s# l/ nchecking for inttypes.h... yes h" t; ~8 h- B9 u9 {+ t
checking for stdint.h... yes
6 @2 G5 N; R: w7 cchecking for unistd.h... yes# {$ F: T2 v+ t, b& m
checking dlfcn.h usability... yes
; q9 b( f } ?/ [8 Uchecking dlfcn.h presence... yes
0 ]* |: j0 Y" `6 H" ~4 Vchecking for dlfcn.h... yes; W" X1 T4 ?% t3 K/ z+ p" ~1 ]: T- Y
checking the maximum length of command line arguments... 1572864" q/ G' q, l3 `
checking command to parse /bin/nm -B output from cc object... ok
" q9 i1 }/ ?; J! kchecking for objdir... .libs
' i7 X6 P$ a' r. U, qchecking for ar... ar' S( N1 e' P2 N3 D. }! U
checking for ranlib... ranlib
% A! m! B- S- u; v% F9 {: g9 T; ?7 Qchecking for strip... strip
% Y! S, J' j8 T( Ychecking if cc supports -fno-rtti -fno-exceptions... no4 v, o1 k: W3 l3 C- H* Y: P
checking for cc option to produce PIC... -fPIC3 h& x+ o5 Z' P' i) e
checking if cc PIC flag -fPIC works... yes1 T1 l4 c; o6 R, q C
checking if cc static flag -static works... no; F, `; d O& R
checking if cc supports -c -o file.o... yes
; G4 S4 E+ j; p7 G4 M) I: kchecking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
+ X9 x; @& j; _ I3 Q1 z2 F0 {checking whether -lc should be explicitly linked in... no
! j5 A, Q+ y% c2 D8 T$ v- P4 Jchecking dynamic linker characteristics... GNU/Linux ld.so
8 z0 V" R, B9 Gchecking how to hardcode library paths into programs... immediate h: W( c4 V5 l& t6 c z
checking whether stripping libraries is possible... yes
+ s# Q5 j3 {% [! x% F9 Q s. gchecking if libtool supports shared libraries... yes6 Y6 g* p! V& H: g: u# q0 Z3 a) f
checking whether to build shared libraries... yes( l3 H& U9 V, M5 f6 m5 E9 p
checking whether to build static libraries... no2 L8 b# \5 O* M& n
6 l+ J: `! C3 x% n
creating libtool2 k9 V! T7 p3 ?, Q! A
appending configuration tag "CXX" to libtool& G) ?0 K! {* M7 ^3 K# {
configure: patching config.h.in- C* d+ _6 M, s% b$ Z1 f9 Z% A
configure: creating ./config.status
, @& A* m# @" P3 hconfig.status: creating config.h
0 H$ B% {) [6 N: y' ^/ {% `/ O( j- S$ W1 Y% y3 |! F- D- o3 z* E4 w
|
|