|
|
php 编译enchant 模块报错解决configure: error: Package requirements (enchant >= 1.4.2) were not met: No package 'enchant' found9 i) F3 v! G- K0 C4 I9 S/ C! d* O
. `& w3 b) L1 T解决过程:
1 T# W* J( j; z. C* C, d[root@ipam enchant]# pkg-config --modversion enchant
. U" j6 A' X ?; ~/ i! BPackage enchant was not found in the pkg-config search path.
! m9 _5 X7 J8 VPerhaps you should add the directory containing `enchant.pc'
Z, S' F& q1 s# D. {4 sto the PKG_CONFIG_PATH environment variable
; W" v6 C3 D* V% S4 Z' qNo package 'enchant' found
2 a7 k9 y& }: m/ J( K& P9 n" r[root@ipam enchant]# pkg-config --modversion enchant-2% c$ Y9 a+ R5 _! ~+ L
Package enchant-2 was not found in the pkg-config search path.- {( g4 |6 R6 H+ v( c6 O
Perhaps you should add the directory containing `enchant-2.pc'! |! }1 B7 @( a+ V# l
to the PKG_CONFIG_PATH environment variable3 {; m. G$ a) E
No package 'enchant-2' found. O% m& D* D5 I' W
[root@ipam enchant]# pacman -Ss enchant
/ T1 ]& h8 k q G" K-bash: pacman: command not found
) [4 y; I3 P7 |3 v- T! }8 X[root@ipam enchant]# yum install -y enchant / ^7 x1 ?; x' D; i
Loaded plugins: fastestmirror, u2 k! X" x' D% Z% ~; L; _1 _8 c
Loading mirror speeds from cached hostfile, E: K9 Z( z2 q' c; C, S" D
Resolving Dependencies/ F' [6 _4 } `% n$ A- P
--> Running transaction check; K4 U+ d5 x1 f0 n/ |/ G/ l! N( u
---> Package enchant.x86_64 1:1.6.0-8.el7 will be installed
) C# q: [$ g# g, f- N3 o& Y$ @--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:enchant-1.6.0-8.el7.x86_64$ R; j# ]! n3 `$ N2 q. P$ Y% d, d
--> Running transaction check
I3 K' q& d! H8 N1 | C$ ~---> Package hunspell.x86_64 0:1.3.2-16.el7 will be installed; k7 Z1 ~: v% U/ u6 R
--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-16.el7.x86_64
9 N, l$ S) w V/ z* |6 s, `--> Running transaction check0 Q! j" Y3 F2 a8 k) b7 O& P
---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
- n' n: t V" L' o. v9 a$ Y--> Finished Dependency Resolution- {, L' U+ a- P
+ _( R0 a- P* D9 k4 I+ KDependencies Resolved/ g3 y6 r0 h) p" o. {" M
1 n5 [% D2 ^# o, D3 A
=============================================================================================================================================================================8 C, a/ A) Y' `; W% q2 l
Package Arch Version Repository Size3 l. f7 S0 A" ~1 ]) s# K+ J0 e
=============================================================================================================================================================================
1 x( g* V; C9 eInstalling:; J t/ R, [2 T5 f! f- t5 W( m' A
enchant x86_64 1:1.6.0-8.el7 base 55 k
1 k4 \! _: A; I+ q+ ~/ F/ dInstalling for dependencies:
) b( B% Y, j2 k$ m hunspell x86_64 1.3.2-16.el7 base 223 k
% n3 y+ o# O& I! X hunspell-en-US noarch 0.20121024-6.el7 base 190 k7 a( i% F" a7 u' A2 X
8 N' j' [9 [0 O( CTransaction Summary
! |" z- m$ L6 y9 d/ A4 r) c=============================================================================================================================================================================* D o# \' u4 H& s1 F. F4 N: {* f2 f+ z
Install 1 Package (+2 Dependent packages)" j- ]; x: ?, u8 c/ f: a/ y
" k9 W" w: |' H: ~6 ZTotal download size: 468 k
# I% a7 s& s$ U- sInstalled size: 1.2 M
7 y: F' H# p4 a; U+ Y( _* ^Downloading packages: e: O- [' z: I" C( o; H
(1/3): hunspell-1.3.2-16.el7.x86_64.rpm | 223 kB 00:00:00 ) k% h& }: e5 E4 j( r* `
(2/3): enchant-1.6.0-8.el7.x86_64.rpm | 55 kB 00:00:00 3 m0 B9 e% K& @- f# w( v& B
(3/3): hunspell-en-US-0.20121024-6.el7.noarch.rpm | 190 kB 00:00:00 5 `9 |# z; k" [2 Y7 h. P
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
: f H5 X% P5 j( x; B9 z: ZTotal 3.9 MB/s | 468 kB 00:00:00
4 Z( \6 H6 x) l v8 J% sRunning transaction check
; X- Q% p T& ], {" c5 S' CRunning transaction test
6 b, i. G6 g" @; e( ?Transaction test succeeded1 ?2 r$ h; e8 i. C, C
Running transaction$ X; x% q1 q# N8 ]! @
Installing : hunspell-1.3.2-16.el7.x86_64 1/3 + t$ n I" V8 f1 c P
Installing : hunspell-en-US-0.20121024-6.el7.noarch 2/3 / E) n/ {3 x/ q' p" R3 j
Installing : 1:enchant-1.6.0-8.el7.x86_64 3/3
A F$ j( ?9 V) |% ? Verifying : hunspell-en-US-0.20121024-6.el7.noarch 1/3
2 u. c6 [: E9 u! Y: ?$ V! S* R Verifying : hunspell-1.3.2-16.el7.x86_64 2/3 3 u, V8 q3 ~& u, n8 t
Verifying : 1:enchant-1.6.0-8.el7.x86_64 3/3
, c. C! e1 y x/ Y
* ]& I2 z% T/ C4 [' a6 TInstalled:& }/ G; e' e5 E, x7 I8 n
enchant.x86_64 1:1.6.0-8.el7 $ E! d K! d. S
0 B# ]6 d. b5 \Dependency Installed:
* U" {7 e! U6 d, Z7 R hunspell.x86_64 0:1.3.2-16.el7 hunspell-en-US.noarch 0:0.20121024-6.el7 $ I$ X& s: T/ I
; W# \1 ]/ g R0 C' ?# L
Complete! g: G; Q$ W* H! V1 l
" k; R2 ]7 J' p& E) O
安装enchant
/ ~+ [* k/ v$ O9 z6 \* M% c2 B, ?[root@ipam enchant]# yum install -y enchant
1 E& x% o2 p& r4 l0 [3 ULoaded plugins: fastestmirror
1 T6 X3 [1 D8 ?$ ^. N/ ILoading mirror speeds from cached hostfile* G, S1 { T( d, g; N6 i1 x% b
Package 1:enchant-1.6.0-8.el7.x86_64 already installed and latest version0 e2 O6 F+ n3 y4 ~; H- {3 a
Nothing to do: s7 t, m& F( a4 g* k. I" n
[root@ipam enchant]# pkg-config --modversion enchant" t. X/ w4 ]" B) i
Package enchant was not found in the pkg-config search path.
4 `: }7 s' u; k; h7 `Perhaps you should add the directory containing `enchant.pc'7 Y) Z) O" x. C0 a& x- M4 N
to the PKG_CONFIG_PATH environment variable
# w$ W. A4 [ u. XNo package 'enchant' found
_) d- B$ H4 z ^[root@ipam enchant]# pkg-config --modversion enchant# O: F) ~: X9 o! M6 w7 V( h( ^
Package enchant was not found in the pkg-config search path.
( o9 W2 M+ ~. l6 V- M7 a. F4 Q! wPerhaps you should add the directory containing `enchant.pc'8 r+ X# K! Z0 Z
to the PKG_CONFIG_PATH environment variable- D1 M0 j: M+ V
No package 'enchant' found
8 e, v$ x9 n( P/ o6 U- {% N& h) b* _1 M! S3 o# e* i
安装enchant-devel插件:
2 e0 F D0 L3 ?
% O. B/ g- p8 V[root@ipam enchant]# yum install -y enchant-devel
$ N8 {, N- ~' F7 N6 D$ @Loaded plugins: fastestmirror
8 x( O: r6 W" D2 O; pLoading mirror speeds from cached hostfile
5 V/ ^' W6 f0 UResolving Dependencies! `' K: f. V) H7 h
--> Running transaction check$ A1 J) t( X$ g2 i2 T- o
---> Package enchant-devel.x86_64 1:1.6.0-8.el7 will be installed1 |. l8 C# f/ Q; J
--> Processing Dependency: pkgconfig(gmodule-no-export-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64
3 H: N3 l9 q6 j% o) u0 |--> Processing Dependency: pkgconfig(glib-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64
0 a$ {$ O5 w6 J* T, i; Q# _# Y--> Processing Dependency: glib2-devel for package: 1:enchant-devel-1.6.0-8.el7.x86_64
5 e% `9 u: c8 W$ ^4 e7 i--> Running transaction check
' \! U0 t8 g" i% c3 O---> Package glib2-devel.x86_64 0:2.56.1-9.el7_9 will be installed/ I* u2 c$ M+ D, I
--> Processing Dependency: glib2(x86-64) = 2.56.1-9.el7_9 for package: glib2-devel-2.56.1-9.el7_9.x86_64 w& B( v$ r3 S9 O- d- c4 G. O0 j
--> Running transaction check3 m& i0 g/ P. [5 J/ p3 z
---> Package glib2.x86_64 0:2.56.1-7.el7 will be updated' S& ?! h- J: i
---> Package glib2.x86_64 0:2.56.1-9.el7_9 will be an update/ `) [: R; U9 t7 r# ?
--> Finished Dependency Resolution
6 I3 r0 _- A# G% ? c/ w9 ~! s% Y& I' R( H# J5 m1 @% N: k9 D0 q; f
Dependencies Resolved) ~! ]/ C% _' x
! [% a" a9 T$ q8 \; A; \ y
=============================================================================================================================================================================
. z7 v5 `+ j. [: ~/ w# ]% x Package Arch Version Repository Size, T% y k2 z( f6 f4 E2 o
=============================================================================================================================================================================7 K1 v+ E, A) N0 {. ^ i
Installing:
- ]$ S( k5 G$ A8 N enchant-devel x86_64 1:1.6.0-8.el7 base 13 k
$ Q5 ~+ |$ K' t7 qInstalling for dependencies:. u. t0 E" S# D
glib2-devel x86_64 2.56.1-9.el7_9 updates 453 k; w- e6 k+ s, H0 x0 d% _1 }
Updating for dependencies:
1 K, K- I# ~5 j3 ` glib2 x86_64 2.56.1-9.el7_9 updates 2.5 M' j% M! H& Q6 Q' M& N
. i/ J2 P' z9 Z- f) V& Y! s
Transaction Summary9 B" _ |, E, X4 S/ t7 S: D
=============================================================================================================================================================================$ r7 L- Q, l$ j; N6 v
Install 1 Package (+1 Dependent package)5 @0 q, {* b: R9 a8 u2 t* B) B
Upgrade ( 1 Dependent package)0 W! C( j) `/ u% x3 v
0 e5 ]3 H9 Q- l/ s% h8 X
Total download size: 2.9 M
; N9 n$ K9 Q7 ^& y! V, ~Downloading packages:
9 s' S3 H% m' v }# G5 vDelta RPMs disabled because /usr/bin/applydeltarpm not installed.5 y" U) U5 U0 }6 z! e6 b; _) v3 Q
(1/3): enchant-devel-1.6.0-8.el7.x86_64.rpm | 13 kB 00:00:00 + O3 y4 {1 c8 A+ O6 Y
(2/3): glib2-devel-2.56.1-9.el7_9.x86_64.rpm | 453 kB 00:00:00
" p; F( X- ~! H8 h$ G5 m% `( G(3/3): glib2-2.56.1-9.el7_9.x86_64.rpm | 2.5 MB 00:00:00 5 o! J, m( \ v2 J6 f' v4 I) b
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------) P: O% L8 r6 I ~! n! ~8 @' ?
Total 28 MB/s | 2.9 MB 00:00:00
" l: ?; d- h( q. x1 P4 lRunning transaction check
: b; b! g# v# r$ |Running transaction test
/ k+ Z1 O3 @" v1 K+ \Transaction test succeeded& ]. {8 j4 z0 t8 c# m
Running transaction
1 r8 {" j" Z* g Updating : glib2-2.56.1-9.el7_9.x86_64 1/4 5 ]) ]. t0 L. o
Installing : glib2-devel-2.56.1-9.el7_9.x86_64 2/4 & a: r& R' f' |
Installing : 1:enchant-devel-1.6.0-8.el7.x86_64 3/4
2 E2 d2 X% p7 h1 k Cleanup : glib2-2.56.1-7.el7.x86_64 4/4
# A4 N3 ^0 ?1 P: n Verifying : 1:enchant-devel-1.6.0-8.el7.x86_64 1/4 7 P F2 J7 }0 K* x! }
Verifying : glib2-2.56.1-9.el7_9.x86_64 2/4 " w" _- U% C/ d/ K# C, F& j$ ]
Verifying : glib2-devel-2.56.1-9.el7_9.x86_64 3/4 4 \; a6 C5 d. A5 Q
Verifying : glib2-2.56.1-7.el7.x86_64 4/4 & c* ?$ M5 F; k
& o( P) M, l7 H) @Installed:$ U7 e" _1 V! Q6 [0 b
enchant-devel.x86_64 1:1.6.0-8.el7
5 U9 _0 F0 V) F7 a
. E/ J! U( y% S$ m! RDependency Installed:3 K0 v1 e6 `% n3 I& z7 k% _
glib2-devel.x86_64 0:2.56.1-9.el7_9
, {% w* } i1 h: `$ F$ e2 k6 P C+ J5 O1 |9 p1 z
Dependency Updated:
& _* ]' q8 {. f; |. w glib2.x86_64 0:2.56.1-9.el7_9
7 O0 a7 `. l( ] `* v, X( F% g' K' j, q" C. @ C
Complete!
: q1 V y- H7 e1 ?( L8 v$ ]- m6 z' t6 w% a# Q
检查版本:' K, x9 d4 s! \& E
[root@ipam enchant]# pkg-config --modversion enchant
3 \3 S0 g1 Q' ~6 t1 x1.6.0
3 j4 K( k0 q! F3 {4 J, n- z$ N2 n- _! Z2 Q& }' J2 C/ l! A
/ A0 t! L! G* `& [: |再次编译:成功解决:
* M! w* s! _* O2 H1 e1 N: N[root@ipam enchant]# ./configure --with-php-config=/usr/local/php/bin/php-config
' t# ~ K9 e+ v4 p/ I. Pchecking for grep that handles long lines and -e... /bin/grep7 b* f( @. G+ z- E& c
checking for egrep... /bin/grep -E
2 N, _. N9 r6 V1 O4 _7 }checking for a sed that does not truncate output... /bin/sed# H* J- C1 L0 N* @
checking for pkg-config... /bin/pkg-config
& u2 Z* f( F7 g1 Nchecking pkg-config is at least version 0.9.0... yes! [" z& y+ d6 k( q, _
checking for cc... cc
& f2 \- w1 ^; z9 P' z1 s, vchecking whether the C compiler works... yes' K+ Q. U* s0 k; Q( D0 b, L
checking for C compiler default output file name... a.out
2 L( L# e2 }8 F6 o' W% pchecking for suffix of executables...
7 v# @3 d$ N7 `5 h- D; N8 }) Vchecking whether we are cross compiling... no
" s7 x) S0 f0 {5 Q0 pchecking for suffix of object files... o# |0 O# l% m: W+ \; [3 a# ]' M' k
checking whether we are using the GNU C compiler... yes
+ M' _( }. ^6 j. ychecking whether cc accepts -g... yes
! B6 w* R9 u, |0 E/ y# X x) Pchecking for cc option to accept ISO C89... none needed2 D# f1 D6 u% \. {$ B) `0 [
checking how to run the C preprocessor... cc -E
/ ?2 h. e+ e. k! bchecking for icc... no/ L! E2 ^3 R) h( b) l3 r' f
checking for suncc... no
' ]2 |/ B/ h0 X- L+ kchecking for system library directory... lib
8 f0 c9 A8 b" d6 ^checking if compiler supports -Wl,-rpath,... yes! I4 }( r4 a, ~
checking build system type... x86_64-pc-linux-gnu* ^. ^' x% A, k" x c/ B% q
checking host system type... x86_64-pc-linux-gnu
! T y5 Y* k x: N2 Qchecking target system type... x86_64-pc-linux-gnu2 M4 P+ t! a$ g2 C
checking for PHP prefix... /usr/local/php
" X& N/ [4 n6 I5 Q$ h8 w. Schecking 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
! [# A9 G7 _# L: f I: v1 Bchecking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-202308318 X7 \3 Y$ A% i( J( c7 \
checking for PHP installed headers prefix... /usr/local/php/include/php
. `+ D! q" U% qchecking if debug is enabled... no- C9 z' ]5 q* }
checking if zts is enabled... no
G8 D; c. H2 H3 i5 \5 q: j8 Uchecking for gawk... gawk
$ p# |9 Y; W1 V! kchecking whether to build with Enchant support... yes, shared
( o$ D9 }, `0 y9 B7 d" rchecking for enchant-2... no
* b+ T1 @4 t+ x) x4 econfigure: WARNING: libenchant-2 not found trying with old libenchant
# H. X/ W5 t5 o, {9 E* [checking for enchant >= 1.4.2... yes5 G& J5 H$ p0 I- {, W
checking for enchant_get_version in -lenchant... yes+ ?. U0 q1 q$ E w, g) v
checking for enchant_broker_set_param in -lenchant... yes& c( H: z! {! u/ g. x
checking for a sed that does not truncate output... /bin/sed
, k. j Y% a4 T% G3 \3 xchecking for ld used by cc... /bin/ld
; ]3 n5 X1 C0 C+ hchecking if the linker (/bin/ld) is GNU ld... yes, t1 V1 x# w$ a! \
checking for /bin/ld option to reload object files... -r1 h' [8 C$ w, T/ d/ v1 l
checking for BSD-compatible nm... /bin/nm -B: g3 F7 I5 b: Q* {
checking whether ln -s works... yes
! I5 U& l* _( P9 [6 Wchecking how to recognize dependent libraries... pass_all
2 G# A, U) h/ h: v. y. n) dchecking for ANSI C header files... yes
/ g9 D. Y8 q3 j9 }checking for sys/types.h... yes+ u! n9 {8 @9 [$ H) C/ L
checking for sys/stat.h... yes
3 ?3 G4 B7 x5 k$ X8 B7 g* H5 R4 bchecking for stdlib.h... yes F6 }+ ]8 Q h; }" d2 I
checking for string.h... yes; X# y. `% E" q( e
checking for memory.h... yes. Z; H( }. b+ I/ Q1 n' w' w0 P3 _
checking for strings.h... yes. B' B: ?" g) F! Z: n
checking for inttypes.h... yes4 L; q) C! R' X; @+ a+ a
checking for stdint.h... yes8 b# `6 Q- H/ ~
checking for unistd.h... yes7 }7 K. P2 M# r+ [; W [# L
checking dlfcn.h usability... yes0 h! d$ m+ h: I2 g
checking dlfcn.h presence... yes4 I3 G$ O$ u& {) ?. D1 P8 B8 J$ h
checking for dlfcn.h... yes; ?; X' ~7 l0 t5 h' n% X' D
checking the maximum length of command line arguments... 1572864' @- z8 M5 H" ~% K
checking command to parse /bin/nm -B output from cc object... ok% o; H$ E3 h% t r# R) I# G
checking for objdir... .libs8 o. X& j% d1 b: u! M6 y
checking for ar... ar8 b0 P1 l( y1 {1 O5 k- a
checking for ranlib... ranlib1 K; T/ I" i0 T) N: {4 X
checking for strip... strip# n. o. E# T% U0 N, T2 V* x
checking if cc supports -fno-rtti -fno-exceptions... no
. e% d/ r/ P4 C5 cchecking for cc option to produce PIC... -fPIC- O# A" }* O9 c0 E+ p3 @! U
checking if cc PIC flag -fPIC works... yes7 w1 ^" ?9 [1 Y
checking if cc static flag -static works... no
* x7 b; n9 G5 Q9 \9 _, Tchecking if cc supports -c -o file.o... yes
4 p, V' M% ]- S. g. P0 U# Hchecking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes- T6 S$ I- c1 M5 R* K
checking whether -lc should be explicitly linked in... no3 |5 k4 M& `" f3 Z0 D
checking dynamic linker characteristics... GNU/Linux ld.so6 g2 M( v* [% `8 c8 e' A! n: R) Q& i
checking how to hardcode library paths into programs... immediate
0 n* l; h `. Ichecking whether stripping libraries is possible... yes
* r" ~& b- [* P4 @ cchecking if libtool supports shared libraries... yes! `- @9 J$ D- q) h( N+ f& J9 H
checking whether to build shared libraries... yes
8 |8 k# [0 J9 Z$ M3 ochecking whether to build static libraries... no
5 w1 ]# B# q; G9 n
( W; `9 K' r, L. [8 f: ^. ?% Qcreating libtool% `( M+ b& i9 I0 y( [
appending configuration tag "CXX" to libtool+ p6 X) c+ S/ l( b6 h
configure: patching config.h.in( i- j8 m% a* H: y
configure: creating ./config.status
" r" S) o' o Zconfig.status: creating config.h; x8 i: S7 |( {2 |/ t/ q! p* e
6 f* b% O; W2 x2 i" a
|
|