找回密码
 注册
查看: 463|回复: 0

pip 安装mysqlclient报错error: subprocess-exited-with-error × Getting rto build whee

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2026-1-8 09:51:35 | 显示全部楼层 |阅读模式
(.venv) [root@controller hcis_manager_portal]# pip install mysqlclient==2.2.6
, e! o1 p# e5 {8 }3 ?& M3 O8 `+ wCollecting mysqlclient==2.2.6
$ [( x3 _; {' d( l9 C: {* j  Using cached mysqlclient-2.2.6.tar.gz (91 kB). _+ n1 x: w' D$ s; ?) O. V
  Installing build dependencies ... done* N6 l/ a5 ~% K/ W( h6 g9 |1 G
  Getting requirements to build wheel ... error# M% `$ X/ n. |, [
  error: subprocess-exited-with-error
6 M( }( M+ _- X9 Q: ?8 r! m  
: e. m0 \/ h# C+ _1 {5 l4 B" {  × Getting requirements to build wheel did not run successfully.7 L1 ]% e9 O, W; d) t/ K; d$ i
  │ exit code: 1, ?3 z( V  z. t) j! s
  ╰─> [29 lines of output]9 D6 S, V9 m7 i1 a4 H  q
      Trying pkg-config --exists mysqlclient
( p+ I& n! S. R4 R7 t; h2 s      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.$ z8 Y3 l% B2 q0 M8 U1 S1 I
      Trying pkg-config --exists mariadb# c/ L* w4 X+ n
      Command 'pkg-config --exists mariadb' returned non-zero exit status 1.' {) N4 p3 u. Q5 z2 S; `
      Trying pkg-config --exists libmariadb5 {% C' l" |- x% z' d
      Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.1 `& U8 r) @) f
      Trying pkg-config --exists perconaserverclient  z* g$ A$ u" J/ s" e
      Command 'pkg-config --exists perconaserverclient' returned non-zero exit status 1.2 Z3 `. b$ ]: u  @8 M1 l3 i
      Traceback (most recent call last):
  L" @& H2 b( C* H        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>! r6 W; s! e4 P
          main()% N7 ?- t% h1 f/ V+ g# |
        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main+ B" V8 [+ i  e5 i% S7 ?
          json_out['return_val'] = hook(**hook_input['kwargs'])/ J- y9 v6 i) V
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^) V$ h5 N3 N8 R1 L* _
        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel. d& o4 M% e1 B* {1 N4 d! G
          return hook(config_settings)" y! B' Q0 S. c. _6 I
                 ^^^^^^^^^^^^^^^^^^^^^$ }7 e9 P7 Z- m4 G3 T, [
        File "/tmp/pip-build-env-useridpb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
+ g, ?- f; s- @9 ?% Q          return self._get_build_requires(config_settings, requirements=[])' I* k5 e3 |; C. ~& K- _
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
( ^( j3 C& v8 _" T5 ?7 c        File "/tmp/pip-build-env-useridpb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
; P/ q' ?+ F) j5 U          self.run_setup()* G4 n" O3 [8 b! I# K! r
        File "/tmp/pip-build-env-useridpb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
4 x) q8 c2 P: `; F6 H          exec(code, locals())/ K+ ?# O; @. C5 P- c5 G0 I
        File "<string>", line 155, in <module>+ X% @3 m* r8 b1 C
        File "<string>", line 49, in get_config_posix
2 P2 t, I# |4 d" f+ N' [        File "<string>", line 28, in find_package_name+ |. J" ]# |4 c0 S+ d3 J( t& q) z
      Exception: Can not find valid pkg-config name.
! U( U/ [; w, N" V4 C: n7 ?      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually" |% B" x: s$ k4 l
      [end of output]+ M7 {& B2 Y, a+ C
  
6 }( x3 i# B2 |6 h# P8 i7 O8 y  note: This error originates from a subprocess, and is likely not a problem with pip.* w, C: o5 z6 l  _- F4 u
7 v+ w/ X$ Z; q; ~
[notice] A new release of pip is available: 24.3.1 -> 25.36 C. K0 T* v3 I% ~" N/ J4 o
[notice] To update, run: pip install --upgrade pip
4 v1 o% |5 S! I9 Yerror: subprocess-exited-with-error
& ]) \5 l7 Z+ x) z* u# K' n# t* B1 z. w* Q
× Getting requirements to build wheel did not run successfully.! p" Q1 @2 k6 Q
│ exit code: 1$ }2 M& ]4 F; W$ M
╰─> See above for output.+ \6 J( O( v  L2 a
5 p+ C: E. Z4 Z4 c! x4 W3 |: x# i
note: This error originates from a subprocess, and is likely not a problem with pip.2 H* l, \$ C, h( [+ D) N, \" E3 _

/ L$ t. Y; t$ k1 S. \, Y2 n( R+ I安装失败:
& X4 {: I# ]# X6 Z& x; v% Y(.venv) [root@controller hcis_manager_portal]# pip install mysqlclient==2.2.4+ Q. j5 M* D4 F! \) S
Collecting mysqlclient==2.2.4
. c. j' c6 T7 I3 E  Using cached mysqlclient-2.2.4.tar.gz (90 kB)6 L% B$ p: |( z+ L* M. O7 y
  Installing build dependencies ... done
- j# J5 y9 G5 W  Getting requirements to build wheel ... error# L- t: `7 \- o% g" \2 w$ N
  error: subprocess-exited-with-error
# C/ Y5 [3 B* n: _/ K9 U; A  & L+ B, c& c# M5 M! A
  × Getting requirements to build wheel did not run successfully.2 p6 t. _7 W0 v+ N( O- o/ h) {
  │ exit code: 1
, R5 {3 K4 q4 a3 C$ Y- h6 R1 c  ╰─> [27 lines of output]
" X) T2 |. J3 g) U/ f9 u! w0 @      Trying pkg-config --exists mysqlclient
2 D3 h7 ?1 U: I0 \" e" Q& p- K4 a      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.
- I1 n9 x5 w, F8 r' h      Trying pkg-config --exists mariadb8 U& J8 ~8 ~& V( u
      Command 'pkg-config --exists mariadb' returned non-zero exit status 1.% g1 x* f( c& H2 t" m
      Trying pkg-config --exists libmariadb, K: ~- q2 o2 K2 A* |( a# Z
      Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.
3 o  y& n4 L/ }% h6 F      Traceback (most recent call last):
8 y7 c5 {/ q- Z9 X$ e& n  t        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>8 v$ D4 F+ M6 [
          main()
2 T8 X+ [3 @) R8 r. m        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main8 U, A2 d+ L$ M+ u. q! P) e, j
          json_out['return_val'] = hook(**hook_input['kwargs'])1 ]3 W5 ]) A7 x  X& F( _) T
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
. O  ~6 X, y$ ^$ l        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
  L1 z# y# O0 r          return hook(config_settings)
7 k" s; e. d1 `3 R                 ^^^^^^^^^^^^^^^^^^^^^
+ o  h- }; I0 E3 Q: f        File "/tmp/pip-build-env-qutrixi9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel9 B. V" c' E2 P5 q  H, {7 c* _
          return self._get_build_requires(config_settings, requirements=[])" O& w; ~+ _0 j3 @
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" K/ u8 {) H4 W) Q& a
        File "/tmp/pip-build-env-qutrixi9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
  W( t2 [" E1 K: Z* L( {, `          self.run_setup()0 b& m2 K5 i' J$ S1 p% }3 Z7 t
        File "/tmp/pip-build-env-qutrixi9/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup( s* W8 u$ G, q* s+ C7 C& M5 G# w! g
          exec(code, locals())- G' O0 N- p5 _. }2 j% ]
        File "<string>", line 155, in <module>
9 i3 W6 B$ I3 [# k$ h, e8 z        File "<string>", line 49, in get_config_posix
4 i( F) O0 f9 J8 J2 r        File "<string>", line 28, in find_package_name6 l/ G5 a) o( `& u# Y
      Exception: Can not find valid pkg-config name.
8 q1 k0 {) i# [2 \- v: d. I      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
8 V$ w3 i& e6 V3 [      [end of output]# G/ E" f' [4 }! Z0 Y
  9 \7 O- P5 S% E/ i: a8 o3 A) T
  note: This error originates from a subprocess, and is likely not a problem with pip.
) B; \9 C' T4 M* K( m. d
, s0 V/ B4 M* r$ _% f/ X: c[notice] A new release of pip is available: 24.3.1 -> 25.3
- t1 a. ]( H: h( `' L1 l6 v1 ?[notice] To update, run: pip install --upgrade pip
7 M. V( X8 d9 V5 P0 d0 M9 l: v. terror: subprocess-exited-with-error
: H$ P; `! r8 A5 _- i- p- v4 E  A% z/ x
× Getting requirements to build wheel did not run successfully.& P4 Q  E( z! j5 d
│ exit code: 1( G' Z* F, K' c
╰─> See above for output.
! m, D; `" ?% u' {% i( e  O/ x+ T  a) |% V
note: This error originates from a subprocess, and is likely not a problem with pip.; S( p1 ^+ j# K1 l6 A1 o% v
(.venv) [root@controller hcis_manager_portal]# pip install mysqlclient==2.2.4
  g" P: g9 E- H% N: a4 [0 q; @Collecting mysqlclient==2.2.4
: v) A) c+ r! z3 D6 ~/ X  Using cached mysqlclient-2.2.4.tar.gz (90 kB)5 I3 B4 h1 g; h9 f5 f6 t
  Installing build dependencies ... done
, s) f' D# G* \, |! J8 z  Getting requirements to build wheel ... error) U3 W/ k8 I( m" U! |4 L: w
  error: subprocess-exited-with-error
! ]( T3 ]& i# z! M  3 x3 X: l6 ^) l5 S9 S
  × Getting requirements to build wheel did not run successfully.; E; U8 d) w3 |+ O! G$ N3 O3 t
  │ exit code: 16 S+ ~: X, l" K8 E8 y
  ╰─> [27 lines of output]
( H7 S9 q7 R& x4 Q      Trying pkg-config --exists mysqlclient, I1 J+ V  Q; x2 J
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.9 c9 g: Z" t5 g/ P( D. ~7 V
      Trying pkg-config --exists mariadb6 C: |" B* ^4 @) N1 S
      Command 'pkg-config --exists mariadb' returned non-zero exit status 1.
9 b- C2 ~3 q8 S) N0 ~  v& L9 i) `      Trying pkg-config --exists libmariadb
# ]8 s. X8 d% v  a      Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.9 S( {+ o. B0 L, n
      Traceback (most recent call last):
6 {; s/ C: i2 c. F" U& {        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
5 ]/ R2 `, b- n. g3 B  c5 ^* w# Z          main()* Y6 G% s2 f0 R$ O) g
        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
  Z2 S" R9 Z: X: r          json_out['return_val'] = hook(**hook_input['kwargs'])
8 ?+ T4 [5 S+ B8 p, k( E                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^1 Y, |5 y$ Y! U+ P
        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel7 f! r7 j3 O, X" h5 I% G
          return hook(config_settings)  W- ^# J6 W  o* h2 q
                 ^^^^^^^^^^^^^^^^^^^^^
0 p7 |9 p+ D& r- v+ R$ y* J; s( b        File "/tmp/pip-build-env-l5wcrzu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel8 p3 ^. P( Y4 |: w5 z
          return self._get_build_requires(config_settings, requirements=[])
& S5 D+ }( L# Y4 Z7 \0 B3 ^                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^. F/ C% P/ A+ w( L! |  @
        File "/tmp/pip-build-env-l5wcrzu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
. m; e( P  Y; ?          self.run_setup()9 G  t! n" z/ a5 o3 d& H. X
        File "/tmp/pip-build-env-l5wcrzu8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup0 _' P& \. u5 A  b* Y
          exec(code, locals())1 l- K; v/ y' Y+ a5 f
        File "<string>", line 155, in <module>3 ~6 U' k- ?8 B6 j9 C  W  A
        File "<string>", line 49, in get_config_posix
, {& t, S0 h; L, B2 {        File "<string>", line 28, in find_package_name! D% O6 P! k( k/ F  O9 Q6 J
      Exception: Can not find valid pkg-config name.) P, w  x9 d# u: f
      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually* B5 |# p& T% u1 l
      [end of output], Q8 F( O% _6 y; v# z) Q% X* Z
  
* `  y8 e- f7 N- O0 k9 o" l6 [6 ^  note: This error originates from a subprocess, and is likely not a problem with pip.: p  n. D) F: r+ C6 ~) `# Q- Z

7 l2 i# A' P* q% \3 {3 C9 ^3 C[notice] A new release of pip is available: 24.3.1 -> 25.3
, b! K$ P4 l- P1 |- [4 ]! V: U[notice] To update, run: pip install --upgrade pip
5 g1 b; _: O" C0 Verror: subprocess-exited-with-error
# G, a' y. m1 @& S
, U) w& L( I: q6 r) H* V, P× Getting requirements to build wheel did not run successfully.
+ h! S) b% c2 K4 O$ x% u│ exit code: 1/ F$ _6 I- z1 V% G. J0 [+ J
╰─> See above for output.7 U& v) H2 k1 n  a. u
/ P3 H/ _- ~1 }
note: This error originates from a subprocess, and is likely not a problem with pip./ m, L- r! B% T9 v) C

4 O3 P" G- R$ a) M& b升级pip组件:& k5 E/ Q4 `: k5 D* @8 w

( @4 B% |- u6 [& M: g3 V# i; W(.venv) [root@controller hcis_manager_portal]# pip install --upgrade pip==25.0.0  |; i! O5 E3 R9 t) y& S
Collecting pip==25.0.0
+ w) d3 z" w! }  l  Downloading pip-25.0-py3-none-any.whl.metadata (3.7 kB)
- h1 Z; r" r! o' Q" T* NDownloading pip-25.0-py3-none-any.whl (1.8 MB)
3 N& [) a4 _% A) K. Y/ f   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 30.2 kB/s eta 0:00:00# W% T% I! q8 n2 [% n) K3 R) [
Installing collected packages: pip$ k' w$ k2 Z* P4 E7 L
  Attempting uninstall: pip9 A1 Y( M$ a) v3 M1 N2 ^2 {# z) b
    Found existing installation: pip 24.3.1" X. B" i& i/ m" i' F  V/ O, v
    Uninstalling pip-24.3.1:, j) b; `$ @4 ]+ D1 O; f2 |& s% e3 D
      Successfully uninstalled pip-24.3.1
( i2 p4 _( ~( a8 j0 ~# @: r! VSuccessfully installed pip-25.08 |$ t% H+ k9 r- |3 C- r

7 u% R- B* b( Z[notice] A new release of pip is available: 25.0 -> 25.32 R  ]6 ~9 K8 r: r+ s3 a' B! X
[notice] To update, run: pip install --upgrade pip
4 {4 G) g. ]+ q* ^* i(.venv) [root@controller hcis_manager_portal]# pip install mysqlclient==2.2.4
% U8 |; M+ V& ZCollecting mysqlclient==2.2.4
* B% j) S4 d* k& s% A- v( Z  Using cached mysqlclient-2.2.4.tar.gz (90 kB)* w* \- B$ R4 O7 P8 R
  Installing build dependencies ... done' n5 V' Q1 R) g3 ?6 ^  i+ H% ^  Z
  Getting requirements to build wheel ... error
. w# h' c/ [# W$ [; X  error: subprocess-exited-with-error3 _1 q; Y0 V$ |$ k' Z. j' R, R) F
  
. Q* o: _; ^" g) d" M  × Getting requirements to build wheel did not run successfully.6 L0 A5 {7 L# p) i: z5 u
  │ exit code: 17 \( y& F0 y  L+ O6 y
  ╰─> [27 lines of output]4 b' j. }0 S% q6 f' t
      Trying pkg-config --exists mysqlclient8 V1 Q/ @2 j7 V! i9 F9 k
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.! z% m. _- W4 e" ~! @! w
      Trying pkg-config --exists mariadb5 V  J6 L& g7 e6 M0 M5 I
      Command 'pkg-config --exists mariadb' returned non-zero exit status 1.' [" x' \' z, e+ F  F
      Trying pkg-config --exists libmariadb
% l: ]; T* e3 E1 C! \, Q+ i$ ]      Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.% B3 L: b3 p; n. U) V! m
      Traceback (most recent call last):
3 D, ^6 L0 z9 V        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
/ N: J  E! b- [9 q: p          main()! a& y* n; o$ L8 _
        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
; z7 q# b$ K3 I9 E% D' g# M          json_out["return_val"] = hook(**hook_input["kwargs"])
# b- G6 H! ^7 c. Q) [+ U: a! \                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 R7 N$ k1 a1 m, ^4 |% t3 U( X        File "/usr/local/python_projects/DjangoProject/hcis_manager_portal/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel2 r6 C' W1 Y7 j" A8 U0 E3 G
          return hook(config_settings)
0 y5 I: {. e  M, r$ o! ]: Y; C                 ^^^^^^^^^^^^^^^^^^^^^6 o6 M; A0 ~7 T+ z
        File "/tmp/pip-build-env-i0x30et5/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
7 Q7 `) m1 X- U          return self._get_build_requires(config_settings, requirements=[])
3 V3 y9 s4 K; o" Z! B  U                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: W8 r3 W! \: z! f        File "/tmp/pip-build-env-i0x30et5/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
+ K9 e1 @1 K' V          self.run_setup()
& S1 ^' Y. U# H8 j0 e* S" l) E7 h, n        File "/tmp/pip-build-env-i0x30et5/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
# }2 u8 V% a/ F) L5 }; q          exec(code, locals())' T% u1 m# Z6 \4 z+ l8 i
        File "<string>", line 155, in <module>
( b1 m1 Y& Z! Y/ ?        File "<string>", line 49, in get_config_posix6 b4 o& j1 o& J
        File "<string>", line 28, in find_package_name
/ l; Z# ^0 _' {* @7 s1 a      Exception: Can not find valid pkg-config name.
# S, d/ S( T# x9 G      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
- L! A  R- j0 u$ k6 g$ ^      [end of output]' A% }% k0 e9 n! o' Y2 _
  " ]* T& W  q8 V; [8 N5 B7 b! [. r
  note: This error originates from a subprocess, and is likely not a problem with pip.6 C* Z/ o' P0 z

* W( |2 E5 c) c6 y2 `3 @( m[notice] A new release of pip is available: 25.0 -> 25.3
; e# b$ [! r& M% [8 d[notice] To update, run: pip install --upgrade pip
4 m7 {( C$ {. ~4 q8 rerror: subprocess-exited-with-error* ^7 ^- v, \& u  X; k/ g

3 c2 Q- y3 b: e$ d× Getting requirements to build wheel did not run successfully.0 [9 F2 q  c8 v0 \2 m. Y% _
│ exit code: 13 f; I9 y" P4 ]
╰─> See above for output.* {# d& I9 _+ m
% I! |' q. P( u6 O: e8 J8 P
note: This error originates from a subprocess, and is likely not a problem with pip.
7 u5 o$ D; X7 G9 B& p(.venv) [root@controller hcis_manager_portal]# ) K0 ]9 O" `. B6 H, M/ j( D# c
(.venv) [root@controller hcis_manager_portal]#
: c* Q! M9 D; J; x* ?) L(.venv) [root@controller hcis_manager_portal]#
; H( K$ f$ }: C/ _2 N0 y(.venv) [root@controller hcis_manager_portal]#
5 C! j* U/ f: h$ _# h8 n8 R/ ~) L/ I' q6 U
安装相关组件包:& c: K5 i: @+ |( `
(.venv) [root@controller hcis_manager_portal]# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config
% K: u2 V8 L- r! ?. ILast metadata expiration check: 0:05:33 ago on Thu 08 Jan 2026 09:43:40 AM CST.
4 f$ r$ K* r/ G" b& i8 i0 A: ]Package gcc-12.3.1-81.oe2503.x86_64 is already installed.
% X( W" c2 p3 c* |7 }+ G, G" vPackage pkgconf-2.3.0-1.oe2503.x86_64 is already installed.: U& n* D. m, v
Dependencies resolved.
7 J/ y" r; Y( t) A9 R==================================================================================================================================================================, H" A; X8 ?; S
Package                                            Architecture                    Version                                     Repository                   Size' }+ T6 @, J6 b8 y1 ~
==================================================================================================================================================================9 m: o9 a0 n( v6 s$ e. Z
Installing:
& T: O- r: _5 H" s' G( ]- l; C* l mariadb-connector-c-devel                          x86_64                          3.4.3-1.oe2503                              OS                          146 k6 U: j% `8 C7 P2 Q9 ]
python3-devel                                      x86_64                          3.11.11-3.oe2503                            OS                           17 M
" j/ g6 l' U- {( F! ?Installing dependencies:
' o: N& Z) Z* ? python3-rpm-generators                             noarch                          9-5.oe2503                                  OS                           21 k
, J  W( N' B5 h! T2 u# ~: G4 V  H+ U' K; H( H0 w
Transaction Summary
6 A) r$ Q2 F& F; W( `==================================================================================================================================================================* N- u0 P; u* m! u2 U& y% x7 M* @+ G
Install  3 Packages
' H, X( ?6 }4 y  K$ k1 w6 M) j- X- [: R7 W# W
Total size: 17 M; O! ^  Z( Z6 o: T% h. H2 N
Total download size: 146 k2 t/ N3 L3 T( _3 D) f1 ?
Installed size: 106 M
" Y7 d' J5 C' Y. u/ MDownloading Packages:
0 j% j+ Y2 f" J[SKIPPED] python3-devel-3.11.11-3.oe2503.x86_64.rpm: Already downloaded                                                                                          
% D- s- L- U/ u: g[SKIPPED] python3-rpm-generators-9-5.oe2503.noarch.rpm: Already downloaded                                                                                       , Z% B4 Q; G- u( p
(3/3): mariadb-connector-c-devel-3.4.3-1.oe2503.x86_64.rpm                                                                        268 kB/s | 146 kB     00:00   
: s% j( U8 U/ r------------------------------------------------------------------------------------------------------------------------------------------------------------------( r: x! D8 ], ~/ R: o/ c
Total                                                                                                                             190 kB/s | 146 kB     00:00     
/ a4 l/ x. Q# z& tRunning transaction check
- |6 |' b; a( l- n: D# |# u5 {Transaction check succeeded.) _) E* e! T0 w; B9 u& n" S# R
Running transaction test
: A7 r; V9 W0 O8 q- P- G0 n3 B+ ]Transaction test succeeded.
+ f4 g& \/ U. L# m& HRunning transaction& T& i9 x/ Q  r0 t
  Preparing        :                                                                                                                                          1/1 # n& x' \2 b! b+ H/ z
  Installing       : python3-rpm-generators-9-5.oe2503.noarch                                                                                                 1/3
1 b. y3 R" H1 B7 w+ w- ?4 [  Installing       : python3-devel-3.11.11-3.oe2503.x86_64                                                                                                    2/3 8 Y: G) n6 D, D. t, z2 C
  Installing       : mariadb-connector-c-devel-3.4.3-1.oe2503.x86_64                                                                                          3/3 8 o& j7 }2 b0 Q! d7 \9 @
  Running scriptlet: mariadb-connector-c-devel-3.4.3-1.oe2503.x86_64                                                                                          3/3
& i* ~7 C# J. o  Verifying        : mariadb-connector-c-devel-3.4.3-1.oe2503.x86_64                                                                                          1/3
0 X% U/ P0 r/ i, A7 K2 H$ V# ^  Verifying        : python3-devel-3.11.11-3.oe2503.x86_64                                                                                                    2/3 5 a% t/ h; f) f% o% G2 h1 N6 ~) ?. {- l' ~
  Verifying        : python3-rpm-generators-9-5.oe2503.noarch                                                                                                 3/3
, Q* I5 L  ^% _* {: O: [
+ h# w( X, e1 k8 Q- yInstalled:
9 k$ ?7 k7 e5 Y" M7 q1 O3 Z  mariadb-connector-c-devel-3.4.3-1.oe2503.x86_64            python3-devel-3.11.11-3.oe2503.x86_64            python3-rpm-generators-9-5.oe2503.noarch           
( U- b  k. l+ t4 i0 ?9 S( z" j9 i# C8 L4 y) B8 l6 y) e
Complete!2 b% P4 m) k$ |' t/ z) X" K$ _

! d7 y2 @# x3 U$ [" K# J: b8 q再次安装:
- |" @0 n$ v9 \% H$ ^7 ](.venv) [root@controller hcis_manager_portal]# pip install mysqlclient==2.2.4; X- w4 L) j+ s, D" l
Collecting mysqlclient==2.2.41 S$ `0 r2 p( E) L1 `
  Using cached mysqlclient-2.2.4.tar.gz (90 kB)- _& q7 A& l1 ]+ b1 B, z
  Installing build dependencies ... done
3 M' w" A( U1 G" y" t. k  Getting requirements to build wheel ... done
6 ?4 B( ]. M1 x8 E5 P! M+ ]  Preparing metadata (pyproject.toml) ... done
* h- Q. d5 \6 @0 m8 WBuilding wheels for collected packages: mysqlclient6 Q1 u! E* x1 _3 j% C7 d
  Building wheel for mysqlclient (pyproject.toml) ... done
" E: j# z! F- w% U, V" A  Created wheel for mysqlclient: filename=mysqlclient-2.2.4-cp311-cp311-linux_x86_64.whl size=79781 sha256=f28c5635af2009e45164e218fa8bb37b32ba06d451dd9a08766a7e91c1c4252b
6 A9 U7 t4 ?- F  Stored in directory: /root/.cache/pip/wheels/1e/2f/4c/0bd8be7e2f3255f9436ce68bb1c2563661e8b7bbd49dcff0e0
! \$ m: [) N4 HSuccessfully built mysqlclient
$ J6 I! l+ O* ~Installing collected packages: mysqlclient: c" V0 e5 o0 A/ Q0 O9 [$ b
  Attempting uninstall: mysqlclient3 Y5 D' e  t2 [
    Found existing installation: mysqlclient 2.2.04 t2 J% ?, i  F) X8 n
    Uninstalling mysqlclient-2.2.0:5 W7 x9 C! X2 I# O0 l! t1 Q2 @
      Successfully uninstalled mysqlclient-2.2.0
6 D3 r1 X! d% ?/ ?" b- Z# L7 `8 oSuccessfully installed mysqlclient-2.2.4
  x2 h- ?" t- }& c
& [$ H7 O! V" g$ h& |5 {[notice] A new release of pip is available: 25.0 -> 25.3
3 }- I4 u& \4 Q. ^8 Y[notice] To update, run: pip install --upgrade pip$ S, ?. w  b3 `

6 ^5 J& K% P6 T7 _0 `成功安装。: m* u- a7 z0 K4 [
0 Y* b4 J8 I; M; j
(.venv) [root@controller hcis_manager_portal]# pip install mysqlclient==2.2.68 k/ t& |" z% e6 T
Collecting mysqlclient==2.2.6
( ?0 s1 |- k# u$ D  Using cached mysqlclient-2.2.6.tar.gz (91 kB)
% n; P$ ]2 W3 J' k9 r7 U" f  Installing build dependencies ... done! D1 E0 s7 L. @0 X! @
  Getting requirements to build wheel ... done
: W& s2 w' t: q0 [! w- w  Preparing metadata (pyproject.toml) ... done& e* U# L# _2 I# o) X
Building wheels for collected packages: mysqlclient3 p" O5 R1 Z- r9 i- A
  Building wheel for mysqlclient (pyproject.toml) ... done
) A: E" V- o, r  \0 P  Created wheel for mysqlclient: filename=mysqlclient-2.2.6-cp311-cp311-linux_x86_64.whl size=80153 sha256=d3621a4c2733d18e78583c9a0558c81a653db240080c03deae38e2d7fa8bbe7b( C( n  _2 h! K- ~3 [  R
  Stored in directory: /root/.cache/pip/wheels/7f/f3/9e/f1b8d41481e49d3d5381db6846c88637d253014786c15eb299" [8 S( G0 L2 N' P
Successfully built mysqlclient% a) c2 C0 X( Z+ V$ E) E- U: n/ _  t
Installing collected packages: mysqlclient; y' [4 o2 G0 w, W' w$ I# q
  Attempting uninstall: mysqlclient$ o2 s% v$ d- X/ P! b5 ]( G  E
    Found existing installation: mysqlclient 2.2.4, f1 ?# i: F4 ^0 L3 a1 t: W
    Uninstalling mysqlclient-2.2.4:. O+ s9 _& O& u3 m
      Successfully uninstalled mysqlclient-2.2.4
! m9 W8 f2 _/ WSuccessfully installed mysqlclient-2.2.6
, Y& i& c* C0 {1 X( z- A$ F# q! \, E1 Q9 Z' q
[notice] A new release of pip is available: 25.0 -> 25.3
+ m; @8 E9 J. y& J' B8 J[notice] To update, run: pip install --upgrade pip. N0 [% ~0 z2 A% q) a

5 J( G1 G+ Q: l$ G8 }/ A5 {
  f4 u5 t  i! t* t6 l成功升级。2 ]( v1 I# Q2 u
完成安装。
' C* D3 M. E- m
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:25 , Processed in 0.019196 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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