易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3|回复: 1
收起左侧

php 编译enchant 模块报错解决configure: error: Package requirements (enchant >= 1.4.2)

[复制链接]
发表于 2024-1-13 09:00:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
php 编译enchant 模块报错解决configure: error: Package requirements (enchant >= 1.4.2) were not met:  No package 'enchant' found
' c! M; C1 _  S3 {. X$ t- O. _) H- @/ j% Q+ V  {
解决过程:
, C- E% s+ P+ @8 V3 U% d2 Q/ z[root@ipam enchant]# pkg-config --modversion enchant- [  [! t2 x+ b- U2 [& T! I% H
Package enchant was not found in the pkg-config search path.5 V' i: O7 [- p7 w; g3 U0 s9 K
Perhaps you should add the directory containing `enchant.pc'
! u! ~: w; G5 v6 rto the PKG_CONFIG_PATH environment variable
; w$ }. T* g! Z5 ^6 _/ c, k8 f9 \No package 'enchant' found9 m/ F4 @+ i5 W8 Z" }' j
[root@ipam enchant]# pkg-config --modversion enchant-2( Z2 ?4 a0 ?; B& v
Package enchant-2 was not found in the pkg-config search path.6 P- Q) Z+ ]( K6 I0 P. ?7 i. O
Perhaps you should add the directory containing `enchant-2.pc'
+ n6 `2 [6 w+ Y* q. |to the PKG_CONFIG_PATH environment variable7 y: A* u; D2 ~3 e+ {
No package 'enchant-2' found
; {) ^) j9 ]/ t/ `4 Q[root@ipam enchant]# pacman -Ss enchant
6 H3 M! b8 I2 @. l/ }) n+ Q-bash: pacman: command not found7 b2 r$ m/ Y1 r5 J
[root@ipam enchant]# yum install -y enchant
0 b4 d: d) \$ I$ Y# ILoaded plugins: fastestmirror' @9 Z( h2 H0 p2 H- d! [
Loading mirror speeds from cached hostfile& E1 F/ W" V1 f6 ]9 ]- C
Resolving Dependencies
* |9 m7 R. B6 ^+ Y) k6 S--> Running transaction check
$ k4 o- _* p, J2 n---> Package enchant.x86_64 1:1.6.0-8.el7 will be installed
0 [( B( A! ?8 n* e: a+ P: M! W--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:enchant-1.6.0-8.el7.x86_64* }! `7 ~7 D/ X- C. U
--> Running transaction check
/ {  Q9 F, D  @7 Z* J---> Package hunspell.x86_64 0:1.3.2-16.el7 will be installed7 L2 S6 ]& R5 [- s& c/ d
--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-16.el7.x86_64- U! O/ {! u! j* L
--> Running transaction check
0 o+ w- K" P9 T7 R2 u8 |5 ]---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
; _. q8 D. L& ]# _/ K- a--> Finished Dependency Resolution
% `9 P1 V( H" ]2 g2 M4 D" g; [$ T+ Y3 s
Dependencies Resolved0 ?$ N' x- k, m) _

" A4 {! }; M3 U  _- S( a/ V=============================================================================================================================================================================( h* J' [+ e7 S7 Q  d' |" ?
Package                                      Arch                                 Version                                          Repository                          Size
  \9 s  e5 W- ]# Y2 h9 E& ?+ `+ i% M7 O=============================================================================================================================================================================0 M& ?  K$ j1 J1 X3 S7 m5 U) t) y
Installing:
+ T. Q- ?; O1 p5 y0 A; ~ enchant                                      x86_64                               1:1.6.0-8.el7                                    base                                55 k
' y: H8 M; S. l) a3 P% MInstalling for dependencies:5 N) S1 p% C, r& x" ~9 }# @' ?
hunspell                                     x86_64                               1.3.2-16.el7                                     base                               223 k
# }5 F/ A! a- Y4 }: w, D- ? hunspell-en-US                               noarch                               0.20121024-6.el7                                 base                               190 k
" J2 Y0 f! A( A5 o: t
+ N, n3 i3 W% [% r" t* ]Transaction Summary
9 i; u- T5 ^7 v5 W0 @=============================================================================================================================================================================
9 |) c# }- I& b* IInstall  1 Package (+2 Dependent packages)3 f6 ^' y/ n& u+ L2 n

0 k0 Q! A6 n$ D, f5 v$ R. Y4 p! \Total download size: 468 k
; B  |! k& _  T% eInstalled size: 1.2 M5 J$ l  z2 O/ m: ^% L8 e, n
Downloading packages:
# T4 Z$ y/ Z7 x; @9 Q, W(1/3): hunspell-1.3.2-16.el7.x86_64.rpm                                                                                                               | 223 kB  00:00:00     / n  |# A9 }! W
(2/3): enchant-1.6.0-8.el7.x86_64.rpm                                                                                                                 |  55 kB  00:00:00     
. k6 U& I: @% W# L) }6 E' V; j6 F(3/3): hunspell-en-US-0.20121024-6.el7.noarch.rpm                                                                                                     | 190 kB  00:00:00     
' [1 N. l) c( s( \/ {: S-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
* g) L2 i* i' q4 NTotal                                                                                                                                        3.9 MB/s | 468 kB  00:00:00     9 s! G5 q) W8 s5 j+ ~( A0 _
Running transaction check
5 J5 U- ^% W6 kRunning transaction test
9 t0 S# @5 `6 B" ]$ m) @9 v; ]Transaction test succeeded4 ?5 u" Z) d: i
Running transaction: F  \/ G8 g8 }! S3 j$ X$ [6 Y
  Installing : hunspell-1.3.2-16.el7.x86_64                                                                                                                              1/3 8 ~. K1 k! f/ v, G4 c
  Installing : hunspell-en-US-0.20121024-6.el7.noarch                                                                                                                    2/3 2 I( P, Z# ~( d7 B+ y! ~& Y
  Installing : 1:enchant-1.6.0-8.el7.x86_64                                                                                                                              3/3 - F6 r; c! y! Z7 D3 D  {
  Verifying  : hunspell-en-US-0.20121024-6.el7.noarch                                                                                                                    1/3 : K3 N7 {9 z6 g4 H* [( Q# ]: X
  Verifying  : hunspell-1.3.2-16.el7.x86_64                                                                                                                              2/3 1 F2 k1 z1 E) D, U
  Verifying  : 1:enchant-1.6.0-8.el7.x86_64                                                                                                                              3/3 1 s+ }. w1 f! r2 Q2 J

0 E* I9 S* l& X$ ]9 g* rInstalled:
- Q! ^6 U: t! S% i- `  enchant.x86_64 1:1.6.0-8.el7                                                                                                                                               
' f& V4 f) ~% m9 g8 @5 J" P# P* b3 P+ ?8 Z' G
Dependency Installed:; u' p! L! B/ Q7 b0 o
  hunspell.x86_64 0:1.3.2-16.el7                                                   hunspell-en-US.noarch 0:0.20121024-6.el7                                                  
, B+ h2 i  v5 K$ Y2 |  k. f/ t5 X1 g( i
$ c) ]* a4 [8 X- h3 RComplete!  ~5 N( Q6 O6 ]
3 j; K( M8 @7 q4 p: M3 n9 H
安装enchant
) }' Q# b9 A7 b! n  ?[root@ipam enchant]# yum install -y enchant    % G8 B7 p1 }" [# ?8 t/ v. H
Loaded plugins: fastestmirror% k, m/ T* p/ Z, a! M: Q
Loading mirror speeds from cached hostfile
' ^/ z% {* J' a8 h* }Package 1:enchant-1.6.0-8.el7.x86_64 already installed and latest version' G5 h/ t5 C/ G/ Y
Nothing to do% L3 O. U. _( ^' }7 o
[root@ipam enchant]# pkg-config --modversion enchant* k5 a1 [8 `. m: T7 x
Package enchant was not found in the pkg-config search path.
  E& \4 Y8 I7 t! CPerhaps you should add the directory containing `enchant.pc'! j4 q: b! e: |* [" W
to the PKG_CONFIG_PATH environment variable
; n" ~& Q# U1 oNo package 'enchant' found
* e: L& ?, k( h8 J[root@ipam enchant]# pkg-config --modversion enchant/ ?9 A& }. E! {1 c8 f) K
Package enchant was not found in the pkg-config search path.% T  Q# X4 I# `9 C! Q
Perhaps you should add the directory containing `enchant.pc'
: h2 g! Z9 `! ]to the PKG_CONFIG_PATH environment variable
: Q# P; @* g6 v: INo package 'enchant' found, Q# _, X7 `5 V0 K
6 F2 u" ?$ C8 ~) Z( l8 v
安装enchant-devel插件:/ c% N, C3 o+ g

; K  E9 }& g! m- z[root@ipam enchant]# yum install -y enchant-devel+ V1 q% L1 J$ j( i1 l% s  K
Loaded plugins: fastestmirror6 i! u+ j: ^5 ~0 s* k- r: s! @
Loading mirror speeds from cached hostfile8 v- `. ~+ j9 }* C# W
Resolving Dependencies6 E# y9 W# g2 y8 y; z
--> Running transaction check1 \* V$ m$ H6 s+ Q# l1 b( L
---> Package enchant-devel.x86_64 1:1.6.0-8.el7 will be installed
0 c% n0 l% l9 r# r1 b: y4 \--> Processing Dependency: pkgconfig(gmodule-no-export-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64+ V/ b* ~: k# a: m+ O8 q, D1 T8 S
--> Processing Dependency: pkgconfig(glib-2.0) for package: 1:enchant-devel-1.6.0-8.el7.x86_64+ p5 G. X% O- K" A+ }! W
--> Processing Dependency: glib2-devel for package: 1:enchant-devel-1.6.0-8.el7.x86_642 G  G' `% Z$ P1 L& p
--> Running transaction check1 M! p% v' l2 [9 v5 ~3 @
---> Package glib2-devel.x86_64 0:2.56.1-9.el7_9 will be installed
# N8 u1 K7 k2 e  @, U) d- n! g--> Processing Dependency: glib2(x86-64) = 2.56.1-9.el7_9 for package: glib2-devel-2.56.1-9.el7_9.x86_647 j* @5 g7 w. c: [: N7 T
--> Running transaction check
1 P8 z8 U2 O% \7 e+ Y---> Package glib2.x86_64 0:2.56.1-7.el7 will be updated
) t9 M' H/ M" q# c, `/ j2 Y, @---> Package glib2.x86_64 0:2.56.1-9.el7_9 will be an update
+ K( f  n, G) u7 d- k* W--> Finished Dependency Resolution
9 h3 B& R+ d. N' P! x! B% z& Z# A) l
- f3 Y5 \* Z0 _) V  Q. zDependencies Resolved% t* k; p+ c" j( b2 |; ?! a
% H, o% x2 T+ I2 ~
=============================================================================================================================================================================* z! E6 t' s. v! W
Package                                     Arch                                 Version                                        Repository                             Size( P2 q$ R+ [. v) V( t
=============================================================================================================================================================================9 O: P2 k* ~0 ~! U. E  i& j6 A! S
Installing:
. A/ f7 r- U6 M  ^ enchant-devel                               x86_64                               1:1.6.0-8.el7                                  base                                   13 k
7 y; x+ z, F" }# I5 `Installing for dependencies:. f: ?$ F5 k0 ~  w
glib2-devel                                 x86_64                               2.56.1-9.el7_9                                 updates                               453 k
( q6 _* ^* J4 a6 |; d3 eUpdating for dependencies:  D! W* x+ F+ l" g
glib2                                       x86_64                               2.56.1-9.el7_9                                 updates                               2.5 M/ B3 r6 r- n2 @; m8 @: }$ ]4 b
3 N; [: F& S: r$ U
Transaction Summary! F# X1 ~% N$ s8 t0 V
=============================================================================================================================================================================
9 j% A( z3 E( E, A* Q6 S6 e4 c! J# KInstall  1 Package  (+1 Dependent package)
9 Z' B; `& u, R1 g7 j# ^- W- ]Upgrade             ( 1 Dependent package)1 G; _  U) c8 O3 z& h) I

1 a+ ], m# C; e; a" a3 PTotal download size: 2.9 M
9 ]/ P  f" i+ u1 H  GDownloading packages:
  n3 Q- ]: j5 R6 m" _, n& J- XDelta RPMs disabled because /usr/bin/applydeltarpm not installed.
7 _2 u: N7 \9 E1 m* u(1/3): enchant-devel-1.6.0-8.el7.x86_64.rpm                                                                                                           |  13 kB  00:00:00     * V- k* w5 A" }$ e! B' {
(2/3): glib2-devel-2.56.1-9.el7_9.x86_64.rpm                                                                                                          | 453 kB  00:00:00     
2 a3 M3 Y9 V% J1 w(3/3): glib2-2.56.1-9.el7_9.x86_64.rpm                                                                                                                | 2.5 MB  00:00:00     
: H- F) D0 c! J# B6 }4 \-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------% D: w7 F1 F" C. {0 j0 ]) I
Total                                                                                                                                         28 MB/s | 2.9 MB  00:00:00     
9 w" G. F/ H5 g! ^. SRunning transaction check
: R: j: y9 {# [  bRunning transaction test8 u, a3 U: E- Z! u# I; Q! K; `# Y
Transaction test succeeded
: E- z- O! n& l: ?' `$ D$ g  }) m& DRunning transaction4 u; C3 C' {( J# F7 G, M
  Updating   : glib2-2.56.1-9.el7_9.x86_64                                                                                                                               1/4 1 I6 j4 F8 e- W" i# U) e
  Installing : glib2-devel-2.56.1-9.el7_9.x86_64                                                                                                                         2/4
" _1 t: O* S& n; [6 b% [) v/ Z5 u" u* d4 m4 o  Installing : 1:enchant-devel-1.6.0-8.el7.x86_64                                                                                                                        3/4
* z2 u! K; S+ O( L9 r  Cleanup    : glib2-2.56.1-7.el7.x86_64                                                                                                                                 4/4 ' t4 l' C2 N1 Y
  Verifying  : 1:enchant-devel-1.6.0-8.el7.x86_64                                                                                                                        1/4
% x) h4 u3 N8 b3 [  Verifying  : glib2-2.56.1-9.el7_9.x86_64                                                                                                                               2/4
. Q, m# B/ g: f  Verifying  : glib2-devel-2.56.1-9.el7_9.x86_64                                                                                                                         3/4 8 Z% d9 F4 b3 O. ]+ w. U
  Verifying  : glib2-2.56.1-7.el7.x86_64                                                                                                                                 4/4
# R3 L4 k7 a0 G% p) M
% y0 n! ]' W# F+ \, o# UInstalled:# @, V+ a0 e+ C; A8 i
  enchant-devel.x86_64 1:1.6.0-8.el7                                                                                                                                         
8 u1 \; L: x) k3 j* D: ]9 P7 w4 H+ |' r9 [  P# B( X
Dependency Installed:
! w  V( y% t! m* A  glib2-devel.x86_64 0:2.56.1-9.el7_9                                                                                                                                        ( t$ j0 ~8 {& X4 t9 o

. L7 b; b- B# I' h, V+ RDependency Updated:2 |, \0 }0 Q4 q7 a
  glib2.x86_64 0:2.56.1-9.el7_9                                                                                                                                             
2 b# N  W3 J" o* }" ?
% K4 g3 O5 H# D: iComplete!: b4 `" s1 K# d9 H( T
4 ~3 q! F. N  O5 j9 x9 P, w9 V
检查版本:
3 ^# E* ]/ s: h( Z! u+ }; ?[root@ipam enchant]# pkg-config --modversion enchant# k. z, _2 M  K7 G' @
1.6.03 A( }4 ]3 T2 F1 P
2 ?4 _- i$ `* j3 X  o# B

$ j- _! p  v3 [) s6 `再次编译:成功解决:# B6 `6 F3 L6 U' P
[root@ipam enchant]#  ./configure  --with-php-config=/usr/local/php/bin/php-config 2 c2 a6 \3 g7 ~; b) g& p
checking for grep that handles long lines and -e... /bin/grep$ e0 G/ G# R8 w2 t; [1 i
checking for egrep... /bin/grep -E3 L0 c9 d$ s3 f
checking for a sed that does not truncate output... /bin/sed9 W4 `; i. n7 y: `' k& [
checking for pkg-config... /bin/pkg-config+ k! I, J) A/ Y1 ?% V& m$ s$ t
checking pkg-config is at least version 0.9.0... yes# y* ^) ~- \# O" e4 W) O
checking for cc... cc
  y  b( l6 W! L* u% ^& v4 Nchecking whether the C compiler works... yes% F1 N3 o0 ~* j4 H. U
checking for C compiler default output file name... a.out
. q9 S' W1 R, R" }) ~+ ^6 `checking for suffix of executables... 0 L; o$ R9 Y. G) r1 Y9 u
checking whether we are cross compiling... no
' ?* h5 Y  z: Q4 W, ^/ \checking for suffix of object files... o
" C; |, F2 @/ g3 Z* @( ~checking whether we are using the GNU C compiler... yes5 L0 U1 n8 c+ P# [( @6 m
checking whether cc accepts -g... yes/ j4 l; q' O& i, o
checking for cc option to accept ISO C89... none needed# p2 a5 v, M7 F, [4 L- _0 S2 ]$ \
checking how to run the C preprocessor... cc -E% E& X7 k. x2 d. {! E6 W! [' ^1 G7 Z
checking for icc... no% A' O7 o4 O# ?
checking for suncc... no
9 O) H! y* P* nchecking for system library directory... lib( \, M( `- f+ x0 R3 C2 S( f
checking if compiler supports -Wl,-rpath,... yes
/ i; Q8 W  T) T4 t# S1 O- nchecking build system type... x86_64-pc-linux-gnu
. A; y4 H# S* ?' S7 M1 _( Ychecking host system type... x86_64-pc-linux-gnu
: m$ J0 `) C4 m: w4 o' m( Fchecking target system type... x86_64-pc-linux-gnu
; W- }9 s3 ~  U" Uchecking for PHP prefix... /usr/local/php9 j  M6 g! ?" i. D; e9 g3 P
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: G- z- t- w6 k$ L3 m0 s
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20230831
, O% l6 y8 Q! r3 N+ \4 O$ Cchecking for PHP installed headers prefix... /usr/local/php/include/php
6 I. a5 W+ x& O) q. P5 c: A: Achecking if debug is enabled... no& H# k5 V2 P. L3 u
checking if zts is enabled... no
/ t7 D7 p: R! m6 A5 S; A# W# }checking for gawk... gawk+ _5 s" v( U! \& X9 k
checking whether to build with Enchant support... yes, shared9 w; ?0 @4 d- P. t
checking for enchant-2... no+ Q( B+ H6 l; F2 d( }
configure: WARNING: libenchant-2 not found trying with old libenchant5 i+ V) v* X6 K5 ]
checking for enchant >= 1.4.2... yes- ~. e5 f. E( \8 e+ O) p- m( g7 `
checking for enchant_get_version in -lenchant... yes
0 D+ s' a& `% r) j) Wchecking for enchant_broker_set_param in -lenchant... yes
9 o3 W! y7 u+ S- A5 Q$ Achecking for a sed that does not truncate output... /bin/sed+ d% [, Z: `7 S- v' y
checking for ld used by cc... /bin/ld
; F+ `" S: T% m* vchecking if the linker (/bin/ld) is GNU ld... yes
. j( x: R6 E! j5 u& E. K! Hchecking for /bin/ld option to reload object files... -r9 z' H- e8 \: r. l' a7 s0 F! G
checking for BSD-compatible nm... /bin/nm -B
# k; B) P) T8 x, k* r1 E) dchecking whether ln -s works... yes6 k3 h5 d- Q* X0 T
checking how to recognize dependent libraries... pass_all
. W& H  Z( `) I+ H$ U( uchecking for ANSI C header files... yes9 j' l7 p4 A5 K( f, m5 T
checking for sys/types.h... yes
' G0 R" H9 F) \0 v5 L& J# v: ichecking for sys/stat.h... yes
& y. N" L, J+ Xchecking for stdlib.h... yes5 c9 b2 h% n  G! o5 C) w
checking for string.h... yes9 C% E1 R; n  D
checking for memory.h... yes
5 ?0 G: E: o3 [checking for strings.h... yes% {0 l' [( v  L9 K- k* E! S  c
checking for inttypes.h... yes
9 C8 i8 d$ P) A, [- a, g  ]3 Wchecking for stdint.h... yes
4 S" L0 A6 g0 a1 @6 Hchecking for unistd.h... yes9 B; s3 f* ~4 Y$ O% \; C
checking dlfcn.h usability... yes
( _; R/ @3 X+ C" c: w1 @checking dlfcn.h presence... yes
% |5 |& z2 w3 o8 ]  G8 nchecking for dlfcn.h... yes
& Y' r6 }8 o. _7 y: o0 ^" mchecking the maximum length of command line arguments... 1572864
7 c* T" _+ q& ?; `checking command to parse /bin/nm -B output from cc object... ok- A: X9 l+ t  s) M( j" |
checking for objdir... .libs7 L. q: q/ u0 h, r; y8 w* N# r
checking for ar... ar" d( p& {! M) p
checking for ranlib... ranlib( x# q' ?, z6 k9 P0 o6 y5 N- h
checking for strip... strip
7 V2 U$ d/ H* j6 a5 bchecking if cc supports -fno-rtti -fno-exceptions... no5 W0 E# ^3 _9 ^# b, L
checking for cc option to produce PIC... -fPIC0 t0 Q7 e7 F0 i: }5 e4 w  Q1 B
checking if cc PIC flag -fPIC works... yes% X) C- [" ]. q* W8 B
checking if cc static flag -static works... no
, P7 N: b& Z! xchecking if cc supports -c -o file.o... yes- [; l5 S. K% T! b. t
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
9 r- D( R9 r. qchecking whether -lc should be explicitly linked in... no
2 p. \. [& L0 z# G! g" j2 qchecking dynamic linker characteristics... GNU/Linux ld.so4 O; j/ x" I! ]  r* `0 P
checking how to hardcode library paths into programs... immediate4 `4 g* V  O5 j* f& o. g0 L, A
checking whether stripping libraries is possible... yes
; ^; `) M  }0 ?+ T, C  F: Vchecking if libtool supports shared libraries... yes
+ b6 b2 U3 b/ {8 O- b6 H# y. |# bchecking whether to build shared libraries... yes9 {: J5 F0 d. q$ Y* Z
checking whether to build static libraries... no' M4 v9 e( l" A- |/ @; z

. i" @2 W# F. R4 U8 rcreating libtool
( I4 q- l  l* b9 v1 {appending configuration tag "CXX" to libtool  h+ \1 d8 ]1 O; }
configure: patching config.h.in. j- @3 Y1 `. L' B
configure: creating ./config.status
& ]% S) N, _- n9 F3 Iconfig.status: creating config.h5 g0 `! D8 b7 L) D) ?/ G$ i* ^% s
& r3 ?" B# h0 l/ E( N- L. m! y
 楼主| 发表于 2024-1-13 09:00:01 | 显示全部楼层
编译通过,后面的过程就不展示了。make && make install2 B  {! R, j: U& P# V7 K
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:27 , Processed in 0.056799 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表