|
|
php 编译enchant 模块报错解决configure: error: Package requirements (enchant >= 1.4.2) were not met: No package 'enchant' found9 s; h+ G8 ~9 q: }% z O
" A9 |9 |5 z" c6 ?
解决过程:5 O# {" z9 t: ?* f1 \! `0 Z
[root@ipam enchant]# pkg-config --modversion enchant; E9 e3 @9 I9 A1 A8 Q$ ]- ~
Package enchant was not found in the pkg-config search path.
0 q4 f- T: T- e+ {/ K5 o* SPerhaps you should add the directory containing `enchant.pc'
U" l# U+ M! X5 d* ?% V9 j) ]# Pto the PKG_CONFIG_PATH environment variable4 X2 r% L/ ]4 m, \+ k6 F& I
No package 'enchant' found
8 G! Z% T9 H" k2 L# }, j3 S[root@ipam enchant]# pkg-config --modversion enchant-2& h3 b. y, M9 ]5 b
Package enchant-2 was not found in the pkg-config search path.. }2 Z5 D) K6 ^1 y+ B' c" Q
Perhaps you should add the directory containing `enchant-2.pc'7 E( r' y; o4 Z8 l; e
to the PKG_CONFIG_PATH environment variable& ~0 s' r4 O, K) A
No package 'enchant-2' found: f4 F% l3 A' E
[root@ipam enchant]# pacman -Ss enchant / B" w& S) G" d# r a% S2 z
-bash: pacman: command not found, h. X# s2 r! E3 }
[root@ipam enchant]# yum install -y enchant + M* L& k. ^$ D/ x% J( G2 ~
Loaded plugins: fastestmirror
& s; y1 q! G- H6 ALoading mirror speeds from cached hostfile
1 r% a4 `/ t# K, E, l1 u6 u4 z4 cResolving Dependencies& e$ w6 E4 O/ N! w& O: ~
--> Running transaction check
- c* E4 J2 l6 }# M: K+ a/ ]---> Package enchant.x86_64 1:1.6.0-8.el7 will be installed
5 g5 M# ?" H9 e b. W--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:enchant-1.6.0-8.el7.x86_64
6 w2 b, Y9 f" u% U w+ f--> Running transaction check
* F* z4 ^7 n: N2 {3 K) D. |0 {* j---> Package hunspell.x86_64 0:1.3.2-16.el7 will be installed
' H1 e0 {. ~6 D; V--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-16.el7.x86_64
$ _" D+ N, d1 E$ M. |/ e# b--> Running transaction check
9 L& C% P. B3 r! Y! L1 o+ G---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
6 r: O: M5 I& U9 r1 [--> Finished Dependency Resolution
& }% {. n+ S: l- V! N+ d$ A' {0 q6 o
1 B+ y& U; N) N& h* i& r) L, u6 d3 q/ RDependencies Resolved
' w, K$ d! F8 z$ y- w$ t; b1 o
# \; [2 O& _, j" I3 d; |6 |=============================================================================================================================================================================
, P Y2 }" Y. U2 N! k9 m- @ Package Arch Version Repository Size
- d& _2 i5 G( T$ U- {3 l$ u=============================================================================================================================================================================
. ~: u: a* m- r. E! k1 Q# dInstalling:
: W/ {$ x6 ^" p& r1 w7 i: n8 A9 a enchant x86_64 1:1.6.0-8.el7 base 55 k o9 ?2 `# N0 W* d' X
Installing for dependencies:
$ J$ m3 W. i" B1 n5 A. W hunspell x86_64 1.3.2-16.el7 base 223 k
5 G. z8 W, x8 `1 H hunspell-en-US noarch 0.20121024-6.el7 base 190 k
+ u8 R5 @7 ?" u# ?
0 Q3 X: O; f0 X8 c9 S1 A$ OTransaction Summary
4 n1 K( D5 ~+ Q+ P1 W( s% A=============================================================================================================================================================================. q. s! f5 M+ k1 u+ c
Install 1 Package (+2 Dependent packages)' r! ]) t5 _% i! H0 j
2 C( v9 G8 y ^: iTotal download size: 468 k
+ H: {5 b' q- z# K& _9 y3 yInstalled size: 1.2 M
6 J: D: m8 U$ x- n- a! _Downloading packages:
3 ^) G' c7 ?& W; d6 k9 [' p(1/3): hunspell-1.3.2-16.el7.x86_64.rpm | 223 kB 00:00:00 + v" D8 Y! b' U; i8 d# ^
(2/3): enchant-1.6.0-8.el7.x86_64.rpm | 55 kB 00:00:00 ( B* p7 E( C4 p% ]% a
(3/3): hunspell-en-US-0.20121024-6.el7.noarch.rpm | 190 kB 00:00:00 9 d4 d7 |. U2 _. T, ^
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
( r1 n$ l K6 g6 g0 qTotal 3.9 MB/s | 468 kB 00:00:00 " w, W" d) y9 b7 c( V& ~6 Z3 @
Running transaction check
/ Q9 a% N; U1 W$ cRunning transaction test
, ~5 _1 r7 z p; y1 ?! OTransaction test succeeded/ F/ e% i# J% v. E2 B( D) c
Running transaction
$ g0 `2 p2 b- y7 e. Q# q Installing : hunspell-1.3.2-16.el7.x86_64 1/3 7 k8 a$ \- y7 C& i: x( r
Installing : hunspell-en-US-0.20121024-6.el7.noarch 2/3
r/ N3 l- f( G2 J; ?( q: R* M5 { Installing : 1:enchant-1.6.0-8.el7.x86_64 3/3
7 S/ K1 n8 C5 \" k- w Verifying : hunspell-en-US-0.20121024-6.el7.noarch 1/3 * U9 O. Q, p0 z [
Verifying : hunspell-1.3.2-16.el7.x86_64 2/3 & B8 X/ Y/ _ A% P: ^
Verifying : 1:enchant-1.6.0-8.el7.x86_64 3/3 $ W1 a8 g' i5 k0 A% K
% n5 @' W3 ]8 O/ Y' n7 V3 `4 eInstalled:
" |1 g* L5 M0 Z8 X* o' Y' e9 e" | enchant.x86_64 1:1.6.0-8.el7
$ l/ ]0 I: G% d1 x0 X3 X
( M, v) M5 @: X; t" @Dependency Installed:6 y9 ?7 R0 o% e; U+ H+ W- n) A
hunspell.x86_64 0:1.3.2-16.el7 hunspell-en-US.noarch 0:0.20121024-6.el7
n* z0 `; }4 W7 }
/ k0 ] P- _% @3 dComplete!
: k6 [& e) Q* u( \( v+ ~8 d% a
安装enchant
i- g% b" G2 _. T! A" q8 A[root@ipam enchant]# yum install -y enchant + f; F* {, e; ~5 F
Loaded plugins: fastestmirror" k' B5 Q7 k+ s6 s; _
Loading mirror speeds from cached hostfile/ B. f* @1 K; P5 g/ f
Package 1:enchant-1.6.0-8.el7.x86_64 already installed and latest version3 ~" h. u v4 B6 O
Nothing to do
7 O) Y I+ b" ^! W4 M5 l[root@ipam enchant]# pkg-config --modversion enchant2 \# o# ~# P3 {7 t# H9 M( z
Package enchant was not found in the pkg-config search path.1 p4 w; x/ j- l8 Y5 Y- b
Perhaps you should add the directory containing `enchant.pc' V0 w+ c5 E+ r" |! K' t
to the PKG_CONFIG_PATH environment variable* q7 @& f3 @3 p {- d8 R- ^! a, }
No package 'enchant' found
. T0 c0 n! L7 C[root@ipam enchant]# pkg-config --modversion enchant
, B \. B4 N( W1 o$ w# B8 hPackage enchant was not found in the pkg-config search path.
6 s, e, X w1 \( Q6 m4 UPerhaps you should add the directory containing `enchant.pc'( g. Z6 c# N! z# \
to the PKG_CONFIG_PATH environment variable
5 @, |$ O. E7 w# } jNo package 'enchant' found
. l- C# `7 a! u O7 V& @# Q$ g& Q" D' F
安装enchant-devel插件:- c# Q, t$ e" s3 A0 z: B: z1 h. d
1 T) P4 R( D- ]9 o: J[root@ipam enchant]# yum install -y enchant-devel
: ^; N; H, C' N% DLoaded plugins: fastestmirror
6 r5 Y( k& B. \9 D" a/ z9 zLoading mirror speeds from cached hostfile
* k. t' s% g* C2 zResolving Dependencies% h! R5 |6 M' d1 R! ]
--> Running transaction check( j1 g1 o5 Q- O* A4 v
---> Package enchant-devel.x86_64 1:1.6.0-8.el7 will be installed9 }* Y4 N2 Y* [, ^% t! P
--> Processing Dependency: pkgconfig(gmodule-no-export-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64
/ b [" I" o* H1 Q( p--> Processing Dependency: pkgconfig(glib-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_649 r4 ^' r6 N7 b$ ^
--> Processing Dependency: glib2-devel for package: 1:enchant-devel-1.6.0-8.el7.x86_64
. R0 j2 }4 c4 l, P--> Running transaction check+ v3 v/ r: X( j- w9 f
---> Package glib2-devel.x86_64 0:2.56.1-9.el7_9 will be installed
! w3 P0 R% E1 `; [7 f--> Processing Dependency: glib2(x86-64) = 2.56.1-9.el7_9 for package: glib2-devel-2.56.1-9.el7_9.x86_64
" `5 s8 D1 P, f4 o9 ^ f- K" r0 D--> Running transaction check: \/ n: D' z- @; Q; R$ B& S+ ~
---> Package glib2.x86_64 0:2.56.1-7.el7 will be updated
2 I6 t; v/ d0 t---> Package glib2.x86_64 0:2.56.1-9.el7_9 will be an update b2 U! C4 W' i- b/ I
--> Finished Dependency Resolution
/ M: u8 y! x/ u; P7 A% U# c H3 \0 |, b! S0 j- O; U4 X0 k4 r+ }- G; R
Dependencies Resolved
b4 F( _3 |0 q, `- `2 U6 @7 k# D( r6 l+ k9 R/ b
=============================================================================================================================================================================
, L- r! |4 q" x, L Package Arch Version Repository Size
3 `& }0 B( j# w=============================================================================================================================================================================
; g" w$ \" u5 L) q# H7 EInstalling:
7 \$ S1 H, n7 F$ o5 v1 l2 b enchant-devel x86_64 1:1.6.0-8.el7 base 13 k
- v7 f+ `* X( wInstalling for dependencies:
* G* m+ i& ?8 Z; H glib2-devel x86_64 2.56.1-9.el7_9 updates 453 k
+ f7 k' k _6 _( L( {' e% S/ CUpdating for dependencies:
6 S5 X" N F F3 r8 M4 ` glib2 x86_64 2.56.1-9.el7_9 updates 2.5 M+ i5 O- ]+ P; y4 p9 Y+ V A
* f- U! h: P2 n" g; Z; M& RTransaction Summary
6 A- U, i) m+ U h=============================================================================================================================================================================
, A- O* e+ C! U* d* _Install 1 Package (+1 Dependent package)& [6 j8 k2 y( }
Upgrade ( 1 Dependent package)
9 o3 a7 p0 L" e3 N6 E1 m* L+ k- D" w W( ~' K- a
Total download size: 2.9 M
2 c' ^& q$ j3 L7 \ g' e1 X! jDownloading packages:
2 V2 }, V7 y% D y' d2 JDelta RPMs disabled because /usr/bin/applydeltarpm not installed.1 Z$ b0 o! `: y* \6 G# d
(1/3): enchant-devel-1.6.0-8.el7.x86_64.rpm | 13 kB 00:00:00
4 g4 x9 Y- a+ c(2/3): glib2-devel-2.56.1-9.el7_9.x86_64.rpm | 453 kB 00:00:00
' X. t" u9 j' L(3/3): glib2-2.56.1-9.el7_9.x86_64.rpm | 2.5 MB 00:00:00 1 }' p8 i( ^7 R& C) z2 d) L. V
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 C- o& i+ v; E: h/ E$ [: KTotal 28 MB/s | 2.9 MB 00:00:00 : V" t/ L1 Q. X \; I& I. D/ R
Running transaction check+ O4 I1 I% c: y1 E5 @
Running transaction test& a2 {. x3 B, ^1 N, `
Transaction test succeeded( i* U! i. G! f. [ ?: h
Running transaction' Q% l2 o) Z" W! u) y. D$ ~( |
Updating : glib2-2.56.1-9.el7_9.x86_64 1/4
0 F$ s. }: P% H" z3 X( t Installing : glib2-devel-2.56.1-9.el7_9.x86_64 2/4
" p% ]* T9 T& M# f0 x& ]8 _. I. T Installing : 1:enchant-devel-1.6.0-8.el7.x86_64 3/4
7 _, {0 `& K8 M. q5 k: M* [- b Cleanup : glib2-2.56.1-7.el7.x86_64 4/4 $ c, P6 [6 y. f; b
Verifying : 1:enchant-devel-1.6.0-8.el7.x86_64 1/4
1 G3 B1 c" |) ]( D" _# E Verifying : glib2-2.56.1-9.el7_9.x86_64 2/4
, m5 q1 m3 ~" s* [& q- A Verifying : glib2-devel-2.56.1-9.el7_9.x86_64 3/4 , Q2 ]( X7 o G" \
Verifying : glib2-2.56.1-7.el7.x86_64 4/4 $ d, }- l) l! ?
1 Y! L( y' b' r9 n- y0 H% E9 S2 p
Installed:
0 V0 I9 Y4 q; B4 |7 \; d' N enchant-devel.x86_64 1:1.6.0-8.el7 ! K0 G s: Z: C- a. s4 |
# t+ b; y: K' s, e
Dependency Installed:
4 l* H0 v8 n* \8 s glib2-devel.x86_64 0:2.56.1-9.el7_9 6 a. j- w$ @# U0 d) ~" {7 c
/ I. z- t, o3 j( b; ]9 P3 s
Dependency Updated:
$ @3 Q, I1 x9 }6 Z8 q glib2.x86_64 0:2.56.1-9.el7_9 6 e& L3 X4 D/ g* H) d9 t
U, @& K# {$ W3 }9 W* X( u# Z- X& YComplete!- z9 @4 \+ S/ K s* _0 A) \
* k+ E; {1 L" X$ o; j
检查版本:
( d3 J& \" r1 z/ D/ V/ ?[root@ipam enchant]# pkg-config --modversion enchant/ b* Z1 u) T) |$ Z
1.6.0
1 d2 k$ ? D3 T- @7 d
" t1 X8 x) a! Y3 P6 _( Q/ s0 |& b* i* U0 U; ^9 J7 d
再次编译:成功解决:* p7 v7 y) j4 h# e& e4 i" }( E1 J
[root@ipam enchant]# ./configure --with-php-config=/usr/local/php/bin/php-config
! V* v' W9 l- Q4 C# P1 achecking for grep that handles long lines and -e... /bin/grep$ e# T* p# f0 m7 N
checking for egrep... /bin/grep -E- W; c* }: n- J+ B: u2 `
checking for a sed that does not truncate output... /bin/sed
" S* U, }" H4 u( T7 E* Vchecking for pkg-config... /bin/pkg-config
, \ i: b3 H2 m: o7 A8 x' s0 kchecking pkg-config is at least version 0.9.0... yes$ j; N. A8 E+ J9 [1 k
checking for cc... cc
4 u3 e; g' z$ C) S8 j8 jchecking whether the C compiler works... yes
1 g/ n' B$ f/ Q& qchecking for C compiler default output file name... a.out& E) E+ \# h" w) `, v
checking for suffix of executables...
! _7 c! q( s2 C/ p; Ochecking whether we are cross compiling... no+ e: S, _1 h' E) E$ ^5 m6 D! W
checking for suffix of object files... o) j' |3 b3 ~! G; v* c2 m( L
checking whether we are using the GNU C compiler... yes
. ]" T2 k/ R2 A" wchecking whether cc accepts -g... yes
( [3 `0 h0 f v$ U4 t* x8 w- [checking for cc option to accept ISO C89... none needed
/ t+ J( X# x& j( i- K, `checking how to run the C preprocessor... cc -E
) T& R! a! L" y* mchecking for icc... no
_. E1 w& b3 V3 ~0 zchecking for suncc... no2 ?3 p ^1 j$ h, I' E. m
checking for system library directory... lib$ W5 v2 g) F$ O) A6 }& S9 @
checking if compiler supports -Wl,-rpath,... yes5 h( _. B9 K1 `5 K! ]5 @
checking build system type... x86_64-pc-linux-gnu8 X3 E' v# N2 \" H
checking host system type... x86_64-pc-linux-gnu
8 p" f/ }- P( c( g9 Cchecking target system type... x86_64-pc-linux-gnu, t* m/ u0 K% T$ F" A
checking for PHP prefix... /usr/local/php
, R- g, p, c' lchecking 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
# t5 Z7 U; U" Rchecking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20230831
. `/ e& D0 X4 V) _checking for PHP installed headers prefix... /usr/local/php/include/php$ c: ]" k" o, A8 G% x5 j
checking if debug is enabled... no8 a$ V. W" U( j g( O% ]
checking if zts is enabled... no9 p* F' A. v6 a1 D
checking for gawk... gawk
- i7 o! l8 _) {/ Ochecking whether to build with Enchant support... yes, shared3 H. h1 D4 h6 Q% v- L1 Y
checking for enchant-2... no
) c) m; r1 G: K$ K( p1 X# Q2 c2 Nconfigure: WARNING: libenchant-2 not found trying with old libenchant
1 z" \- b/ k6 _: E4 |checking for enchant >= 1.4.2... yes
" r7 x* k, |2 ~2 Rchecking for enchant_get_version in -lenchant... yes
8 R4 q9 R# M8 E/ bchecking for enchant_broker_set_param in -lenchant... yes
' I& n) K6 E6 K1 T+ J8 k# h3 \checking for a sed that does not truncate output... /bin/sed
, _0 X9 A4 {! |. @; Z& V1 k: q; ochecking for ld used by cc... /bin/ld
, Y. _2 q/ f2 D& Z. b3 Z# S/ d' F( y" tchecking if the linker (/bin/ld) is GNU ld... yes
" m& A r4 K$ n7 T/ ^ jchecking for /bin/ld option to reload object files... -r0 O& t% @( ~8 r
checking for BSD-compatible nm... /bin/nm -B% |) o0 F9 V( p, R( t- D! L
checking whether ln -s works... yes6 a* J! Y: z% _5 f' ?
checking how to recognize dependent libraries... pass_all" J3 Z+ s2 {' u" H. s
checking for ANSI C header files... yes# V) m: |7 }+ v6 G
checking for sys/types.h... yes
4 u7 P6 M0 \# u' c" A4 y1 o9 p7 S8 nchecking for sys/stat.h... yes+ C8 Y8 Z$ `: x* v7 v7 i& j- B
checking for stdlib.h... yes
) v/ {( O0 q5 t* wchecking for string.h... yes
$ F% U. h0 f$ w2 `checking for memory.h... yes- j' W4 d: \. m6 `. i4 H
checking for strings.h... yes
) k; z! [0 z0 {: ~; rchecking for inttypes.h... yes: ]+ R. \, [, G1 p, g" y5 P2 }
checking for stdint.h... yes4 W- V# f2 G4 j, T5 o9 h6 v
checking for unistd.h... yes1 [7 G" K& j9 _" c2 D6 Y* H* M
checking dlfcn.h usability... yes
3 r, `) t9 Z* r1 e9 ochecking dlfcn.h presence... yes
4 W* T3 t& o6 ~, b, ]9 D* l3 X; Kchecking for dlfcn.h... yes! ?" ^% Z T {- D0 z5 y
checking the maximum length of command line arguments... 1572864
* \# G" s/ V' lchecking command to parse /bin/nm -B output from cc object... ok
" Z- @+ i4 s# p( \3 q5 cchecking for objdir... .libs R0 s$ C+ e/ B( x& a9 O
checking for ar... ar
L9 a" T: s/ j4 ~) ~, m! mchecking for ranlib... ranlib
5 x! ] j+ k4 Vchecking for strip... strip, q" J. e& q( g4 o, p5 ]
checking if cc supports -fno-rtti -fno-exceptions... no+ K& }3 B' { U! ?! `6 T
checking for cc option to produce PIC... -fPIC
1 r; f4 i; w& m' w) j" @) p J" uchecking if cc PIC flag -fPIC works... yes, S2 p z& F8 U2 K( r' I4 k( _
checking if cc static flag -static works... no
7 V. [# c" l0 T3 C. Q7 vchecking if cc supports -c -o file.o... yes, B, b" f. E t7 t0 P3 W
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes; ?3 Z8 Q6 _) o
checking whether -lc should be explicitly linked in... no$ \1 L8 i* ~; o
checking dynamic linker characteristics... GNU/Linux ld.so2 s& ]! w2 U. ~6 i2 x* D
checking how to hardcode library paths into programs... immediate
4 b' _% I5 e; Q4 b" f) S+ ^checking whether stripping libraries is possible... yes( ?3 L( A6 Z1 ^0 m7 O6 O
checking if libtool supports shared libraries... yes: k3 \9 T: z# \; H
checking whether to build shared libraries... yes0 U; f9 H$ g! q& L) g4 }
checking whether to build static libraries... no& n- d' j1 v; A! y( X
& K% Z+ v$ D) q, a* X
creating libtool$ N% A, z6 I/ o$ n
appending configuration tag "CXX" to libtool
0 z, m2 q# V% u- Xconfigure: patching config.h.in
$ X0 `% [7 h8 D1 }1 _) G- a _configure: creating ./config.status
6 D* w+ Z6 ~! @( q gconfig.status: creating config.h
( \8 \" g. F2 b8 d
, p" A" ]9 `* N' J$ r3 i |
|