|
|
Collecting mysqlclient
+ D$ p( P Q8 j1 @. T: a& t Downloading mysqlclient-2.2.8.tar.gz (92 kB)
6 g1 Y4 G/ [$ a Installing build dependencies ... done: r$ r7 G7 i- d: M
Getting requirements to build wheel ... error
) z5 t* t( F: N8 a/ X/ v! I! ` error: subprocess-exited-with-error+ s$ k" M! d+ s- r/ q7 H
( }- G! e5 M4 Z' n × Getting requirements to build wheel did not run successfully.
$ j4 `2 t' J i3 M+ X │ exit code: 1
' a1 V' E3 K$ Z- T- {% u k4 V% F ╰─> [31 lines of output]1 l. m& F b8 E
Trying pkg-config --exists mysqlclient
( D2 q8 g6 j4 G7 G2 i. q Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.
6 P4 O: {5 p+ `/ K3 \! _% Z n% j8 |) ` Trying pkg-config --exists mariadb# i* d( R/ w0 ^6 H7 D
Command 'pkg-config --exists mariadb' returned non-zero exit status 1.
q5 ?+ X' `* Z7 P" y8 [ Trying pkg-config --exists libmariadb$ ^! m! j3 \7 M3 }3 n& E& c
Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.# T( E( U) t2 V9 H' u- ]
Trying pkg-config --exists perconaserverclient0 y% D; ?7 h1 E- ~
Command 'pkg-config --exists perconaserverclient' returned non-zero exit status 1.& g8 n" Q) I8 R6 A3 F+ y7 `6 U
Traceback (most recent call last): l( \. H# B& N/ s. l
File "/usr/local/python-3.13.10/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>7 y8 ~2 f. J' l$ F9 O5 o& b1 s! R+ O
main()( g$ b! Q9 E' d C
~~~~^^
0 F: ^; M! h; J+ F/ W* D File "/usr/local/python-3.13.10/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main2 t7 D; i* L8 X5 X2 g9 T. A
json_out["return_val"] = hook(**hook_input["kwargs"]); X) |; b9 S1 y9 ~0 ^9 H
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
7 F$ O8 o, j9 L: C; z; [6 j; K) J0 \ File "/usr/local/python-3.13.10/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel# f3 \# a: c. E- R
return hook(config_settings)* W6 T5 D; t4 K! `/ o
File "/tmp/pip-build-env-y6iocmfk/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
9 A, C( b2 [- y8 v( t- B return self._get_build_requires(config_settings, requirements=[])
$ H. S/ @4 C g ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^% ^- ~) f% T4 d9 j7 P2 A2 n
File "/tmp/pip-build-env-y6iocmfk/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
; s' F! R1 _! v2 |- H1 Y9 M self.run_setup()/ z) c/ j% h5 D, C2 L$ u0 w @
~~~~~~~~~~~~~~^^
0 W8 R4 D, A% j* \: | File "/tmp/pip-build-env-y6iocmfk/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
) p0 S4 {! A) A# e exec(code, locals())+ T- j1 f- [' C' }5 L
~~~~^^^^^^^^^^^^^^^^% v$ e' h7 w7 K
File "<string>", line 156, in <module>
, g1 o( j0 S/ F p' K& T9 n File "<string>", line 49, in get_config_posix' h: ?. R$ P. p5 P& c
File "<string>", line 28, in find_package_name
) \& u1 ]0 ^ X" M& b3 v R& @ Exception: Can not find valid pkg-config name.
) W7 x. l) j# Q. d9 D% G+ O' | Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
) `: o2 `. z4 z" q/ N, @: U [end of output]! g. ^ H! |, ^' j: d9 I
$ N! E: p: l \$ l# v3 n k" Z9 n note: This error originates from a subprocess, and is likely not a problem with pip.! n* v# E; p: R5 a2 s" c
% U3 x3 C" H& D& \[notice] A new release of pip is available: 25.3 -> 26.0.1
- j, {' p6 q7 Z% n1 ]' R3 g[notice] To update, run: /usr/local/python-3.13.10/bin/python3.13 -m pip install --upgrade pip9 W: ^0 J2 t. T$ e
ERROR: Failed to build 'mysqlclient' when getting requirements to build wheel/ {; r$ c _+ Q5 F6 ^
, n2 k# [ W- T8 A' v7 i+ F. p: D5 z6 s& S# _# Z& E
解决办法:! Y2 y) v: H, B) t: Q
安装相关的包:& q2 u' E# T! P" |- Y( W
dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config8 Z% c. k B: ^" x$ t( B
$ }4 D( ]0 k) H! a7 t& N; `. ]) m- L! U7 h% n, C
3 y6 k' u& u& {+ p: L
Downloading Packages:
' y9 h9 J( k& o[SKIPPED] platform-python-devel-3.6.8-41.el8.x86_64.rpm: Already downloaded
5 E% R0 n2 E# e3 h7 B4 x% U[SKIPPED] python-rpm-macros-3-41.el8.noarch.rpm: Already downloaded " J# u# F2 m2 o- L3 [- i
[SKIPPED] python-srpm-macros-3-41.el8.noarch.rpm: Already downloaded 5 r5 G. a9 X5 \+ _/ N, e
[SKIPPED] python3-rpm-generators-5-7.el8.noarch.rpm: Already downloaded
5 b& B0 V; j" h# z5 v$ S% V[SKIPPED] python3-rpm-macros-3-41.el8.noarch.rpm: Already downloaded # q/ H9 h0 q5 H: h$ n- Q! z
[SKIPPED] python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64.rpm: Already downloaded
5 F7 R" d' F* P b# _[MIRROR] MariaDB-devel-12.2.2-1.el8.x86_64.rpm: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://dlm.mariadb.com/repo/mar ... .2-1.el8.x86_64.rpm [SSL certificate problem: certificate is not yet valid]/ a1 Q8 }$ P# O/ o, N6 a2 i6 H
[MIRROR] MariaDB-devel-12.2.2-1.el8.x86_64.rpm: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://dlm.mariadb.com/repo/mar ... .2-1.el8.x86_64.rpm [SSL certificate problem: certificate is not yet valid]
8 k9 V. f% l- X$ y) g8 G/ l% O[MIRROR] MariaDB-devel-12.2.2-1.el8.x86_64.rpm: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://dlm.mariadb.com/repo/mar ... .2-1.el8.x86_64.rpm [SSL certificate problem: certificate is not yet valid]' }) t! j. b8 I4 H* {! M* F' ^# Z
[MIRROR] MariaDB-devel-12.2.2-1.el8.x86_64.rpm: Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://dlm.mariadb.com/repo/mar ... .2-1.el8.x86_64.rpm [SSL certificate problem: certificate is not yet valid]$ w& k8 ~/ G3 D' ]
[FAILED] MariaDB-devel-12.2.2-1.el8.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success
/ v. T2 q& L. X) p. p* {
: w1 m& r2 J2 D8 K& WThe downloaded packages were saved in cache until the next successful transaction.
' s3 s, _: S3 _+ J& i2 j* ]You can remove cached packages by executing 'dnf clean packages'.$ M8 `' T R! @) G5 O2 L" B
Error: Error downloading packages:+ Y) c/ ^3 w3 x! ^5 N) B9 L8 S
Cannot download rpms/MariaDB-devel-12.2.2-1.el8.x86_64.rpm: All mirrors were tried+ V2 L; b( w1 o- k6 ~/ T2 f
(assetvenv) [root@asset ~]# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config
Z, m$ {6 t) c. V- hMariaDB Server 0.0 B/s | 0 B 00:01 % p+ c8 p, L. {8 D
Errors during downloading metadata for repository 'mariadb-main':
t+ \7 x4 A5 E0 W5 n - Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://dlm.mariadb.com/repo/mar ... repodata/repomd.xml [SSL certificate problem: certificate is not yet valid]. \# ]0 p+ n) G
Error: Failed to download metadata for repo 'mariadb-main': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried, d2 k' r1 g+ t6 I z
! X# T9 n6 Y- n+ y, ^
# S c% V* v& M; m
又报错:4 x8 }$ F9 Q- c. U: f/ [8 `+ D' E
7 L+ u2 B2 o+ l3 w因为时间不同步,调整下时间即可:
, K# a" I7 r1 T H3 y S: q1 o: B
/ p6 j' g! _% _- ]- q# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config
3 e4 D- M4 Y7 OMariaDB Server 0.0 B/s | 0 B 00:01
" Z- Y+ {- L; A, i2 M% HErrors during downloading metadata for repository 'mariadb-main':
+ d7 j% u9 a. b v+ v% R& i - Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://dlm.mariadb.com/repo/mar ... repodata/repomd.xml [SSL certificate problem: certificate is not yet valid]) I( E f" v+ i4 I8 }" K
Error: Failed to download metadata for repo 'mariadb-main': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried! |% b% \; y4 ]$ ~
(assetvenv) [root@asset ~]# date -s 4/9& y4 j8 `2 ?- p
Thu Apr 9 00:00:00 CST 2026
. n9 ~! c/ E Z, l, \(assetvenv) [root@asset ~]# date -s 15:56:00
+ W1 i$ Z0 p% ?9 S" ~Thu Apr 9 15:56:00 CST 20268 q% Q/ _# G; b0 A* |3 @ D
(assetvenv) [root@asset ~]# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config6 I8 K4 W; x$ N: `3 j, L5 r* [
Last metadata expiration check: 4:35:55 ago on Thu 09 Apr 2026 11:20:08 AM CST.
" `9 b! m# H, G, b ]Package gcc-8.5.0-4.el8_5.x86_64 is already installed., w% ^8 r! r6 k/ x7 B
Package pkgconf-pkg-config-1.4.2-1.el8.x86_64 is already installed.$ E o' d8 H7 {6 f/ {; b( N+ Z
Dependencies resolved.+ r- u$ I ~2 L# \; o1 B( Z
================================================================================================================================================================
! l5 K2 A, G- f Package Architecture Version Repository Size
$ k6 \9 ~$ X% m% w9 B================================================================================================================================================================
5 ?! M6 T# q5 G f# nInstalling:# b% i% i4 `6 J
MariaDB-devel x86_64 12.2.2-1.el8 mariadb-main 9.1 M4 V, S3 S1 k/ J/ K0 P) s
python36-devel x86_64 3.6.8-38.module_el8.5.0+895+a459eca8 AppStream 16 k6 y+ c; a8 [' H
Installing dependencies:
6 o* }+ T7 ~6 J/ T; |" Z platform-python-devel x86_64 3.6.8-41.el8 AppStream 249 k
+ o: n d/ [4 S9 ~* m python-rpm-macros noarch 3-41.el8 AppStream 15 k
+ f! ~; S0 V& X. ^' e0 Z. `( c6 V python-srpm-macros noarch 3-41.el8 AppStream 15 k
0 L6 l6 z7 i! @% e s6 E0 u python3-rpm-generators noarch 5-7.el8 AppStream 25 k
) ]6 e( {/ c6 T2 i$ w+ U: J9 | python3-rpm-macros noarch 3-41.el8 AppStream 14 k& D6 v5 _, d e* z0 r0 R7 p, h6 ~
3 m) E V: C: N' b% p- N! sTransaction Summary
$ H* m# a) J( }% J W& x+ C; V/ T================================================================================================================================================================
9 U% \( {: X+ u* _% KInstall 7 Packages/ u6 s& j: `: x7 B- Y
. K4 O9 l' ^# _( p+ X0 b
Total size: 9.4 M
+ o0 p6 \8 o* S9 J" E& L1 YTotal download size: 9.1 M
& s8 h) R0 w' m4 D4 c4 g/ vInstalled size: 59 M
! n- P0 U* W$ j6 D+ Q+ S) M! ADownloading Packages:
) ^" |3 l. N& v3 H- K% u/ x[SKIPPED] platform-python-devel-3.6.8-41.el8.x86_64.rpm: Already downloaded / m1 v# ^) j5 ^0 I; X/ F
[SKIPPED] python-rpm-macros-3-41.el8.noarch.rpm: Already downloaded ' W4 T# ~6 r- t, D
[SKIPPED] python-srpm-macros-3-41.el8.noarch.rpm: Already downloaded / J0 ]* E( V0 a7 T+ r
[SKIPPED] python3-rpm-generators-5-7.el8.noarch.rpm: Already downloaded 9 Z2 d7 b' L% X& N
[SKIPPED] python3-rpm-macros-3-41.el8.noarch.rpm: Already downloaded
7 ~' R* R& E: S7 p! {! u[SKIPPED] python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64.rpm: Already downloaded
+ C" D- |+ z' H(7/7): MariaDB-devel-12.2.2-1.el8.x86_64.rpm 3.7 MB/s | 9.1 MB 00:02 z2 v( g$ [( @+ k, N+ H
----------------------------------------------------------------------------------------------------------------------------------------------------------------! R1 A6 Q# c, O0 r, ^4 W5 w: k
Total 3.6 MB/s | 9.1 MB 00:02 4 ~3 P: O9 H5 _# F" e
Running transaction check
4 t5 ^: `" Q X' |& C4 r+ M" l3 FTransaction check succeeded.# Y B) f. K& T! A# B+ B
Running transaction test6 p" C* h& r- Y( A1 N
Transaction test succeeded.
& J; ]4 K, R! F% m5 {4 i$ ?; |Running transaction6 Q9 H. A0 Z' k, M5 W5 Q1 T0 q
Preparing : 1/1
* l! j5 \$ W* J Installing : python3-rpm-generators-5-7.el8.noarch 1/7 / F$ ~* I, @6 e# w- D1 {* }
Installing : python-srpm-macros-3-41.el8.noarch 2/7 E" z4 C9 ?% I/ q- Y. I7 H7 c
Installing : python-rpm-macros-3-41.el8.noarch 3/7
: H* T; m8 ]& E0 K+ K Installing : python3-rpm-macros-3-41.el8.noarch 4/7 6 p W* x% E* b) s- {$ F& M+ i) p
Installing : platform-python-devel-3.6.8-41.el8.x86_64 5/7
) U1 l: h+ m: ^( S7 Y Installing : python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 6/7
. l% w9 M# x9 J* ?! ? Running scriptlet: python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 6/7
6 p4 Q" q% p3 c. Q" s! k6 Z Installing : MariaDB-devel-12.2.2-1.el8.x86_64 7/7 T. w+ n1 w6 Z& Y8 A s
Running scriptlet: MariaDB-devel-12.2.2-1.el8.x86_64 7/7 5 c0 A) I) l# F; W! p
Verifying : platform-python-devel-3.6.8-41.el8.x86_64 1/7
2 [/ V; x0 z* _# h7 ~: T Verifying : python-rpm-macros-3-41.el8.noarch 2/7 $ e2 q; e! s- J9 W7 R2 w
Verifying : python-srpm-macros-3-41.el8.noarch 3/7
% z& g5 [- u0 G) d% B Verifying : python3-rpm-generators-5-7.el8.noarch 4/7 % |' R$ [ _, U2 c: y# D8 [
Verifying : python3-rpm-macros-3-41.el8.noarch 5/7 P7 G/ r. W7 O! U
Verifying : python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 6/7 + R1 O5 ^( q' w4 G' h3 j% F! B
Verifying : MariaDB-devel-12.2.2-1.el8.x86_64 7/7 4 }7 x; V2 c$ W
) j4 @- a8 m. H! x, |
Installed:: ]; a1 G$ L) B4 [1 g+ P
MariaDB-devel-12.2.2-1.el8.x86_64 platform-python-devel-3.6.8-41.el8.x86_64 python-rpm-macros-3-41.el8.noarch $ B: u n- [- z- _; b7 ]
python-srpm-macros-3-41.el8.noarch python3-rpm-generators-5-7.el8.noarch python3-rpm-macros-3-41.el8.noarch ( V0 w# F. a# J
python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 % a; q# V& [6 K+ i9 b
- }* J. b) v* l) }3 F
Complete!/ _4 d7 Z9 o2 z" p+ i( i; l
+ a3 B U: c9 f0 b: f H) s
& w0 a2 `, V- W' T
再次安装:- S$ [& L! v: \! s' q v
/ G8 e7 K- Z& y' ~* g- G- E
+ ?. K9 M3 Z2 e* ?- A
# pip install django==6.0 mysqlclient django-cors-headers openpyxl qrcode pillow
: B% C) B$ }, I+ Y1 E- bRequirement already satisfied: django==6.0 in /usr/local/python-3.13.10/lib/python3.13/site-packages (6.0)
2 c; Z' y) y7 T( l, G$ M. j1 \+ GCollecting mysqlclient
h/ F' I6 w% i Using cached mysqlclient-2.2.8.tar.gz (92 kB)
( u7 g* F2 ~ q) e) V! L Installing build dependencies ... done
; o3 x; Q) [6 l4 p% g Getting requirements to build wheel ... done1 A8 r4 H' {/ F% o
Preparing metadata (pyproject.toml) ... done
, C0 G$ ^# }- d8 S8 KCollecting django-cors-headers' ?% O, E( u1 c5 t' M' A6 F
Downloading django_cors_headers-4.9.0-py3-none-any.whl.metadata (16 kB)
) v# k" v6 ]9 [1 A3 p9 [Collecting openpyxl" K( k/ c" _0 N8 y
Downloading openpyxl-3.1.5-py2.py3-none-any.whl.metadata (2.5 kB)7 w1 o1 S# v! h1 ]) J6 f7 O
Collecting qrcode- {- t1 M, {3 w i/ |0 T6 o
Downloading qrcode-8.2-py3-none-any.whl.metadata (17 kB)
. J1 e" n. U u0 V: ACollecting pillow9 E3 \0 U0 s. d' l3 s p. _
Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)
. f h) v9 Z* e6 k" ]8 O0 E8 qRequirement already satisfied: asgiref>=3.9.1 in /usr/local/python-3.13.10/lib/python3.13/site-packages (from django==6.0) (3.11.1)
. K8 h$ j3 A4 M {Requirement already satisfied: sqlparse>=0.5.0 in /usr/local/python-3.13.10/lib/python3.13/site-packages (from django==6.0) (0.5.5)
) R* `& Q B0 @4 G3 v& W! |0 QCollecting et-xmlfile (from openpyxl)
) K( C# }' J2 j Downloading et_xmlfile-2.0.0-py3-none-any.whl.metadata (2.7 kB)2 W3 h5 d" Z' A2 f- K9 b$ C4 }9 A
Downloading django_cors_headers-4.9.0-py3-none-any.whl (12 kB): p4 n8 Q8 F( |8 Q" t
Downloading openpyxl-3.1.5-py2.py3-none-any.whl (250 kB)4 A, r+ h" e9 k/ [% p
Downloading qrcode-8.2-py3-none-any.whl (45 kB)
: r8 R: G" T/ H! KDownloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB)1 S4 t6 V" c% Y
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 6.3 MB/s 0:00:01
1 r9 [$ n) e% P; fDownloading et_xmlfile-2.0.0-py3-none-any.whl (18 kB)
6 |6 z8 K1 }% w- ]Building wheels for collected packages: mysqlclient
1 p5 G( `0 W+ R6 x( ^, A Building wheel for mysqlclient (pyproject.toml) ... done
* N$ y# e: L$ G5 U" m Created wheel for mysqlclient: filename=mysqlclient-2.2.8-cp313-cp313-linux_x86_64.whl size=142572 sha256=2c46fc0c29d6e5974f6df057c8ddc59273f914b5f188d7b885976d5286e9cc53+ f L9 K }2 g% f, A' L
Stored in directory: /root/.cache/pip/wheels/f8/e5/67/017f03738b3b81b2a504661f31a9fb909e452d7740aab517bb7 r- z, q! Q; _% F
Successfully built mysqlclient, \& E( t q, x0 F3 N6 D9 t
Installing collected packages: qrcode, pillow, mysqlclient, et-xmlfile, openpyxl, django-cors-headers0 G7 a$ t Y1 I2 I% q
Successfully installed django-cors-headers-4.9.0 et-xmlfile-2.0.0 mysqlclient-2.2.8 openpyxl-3.1.5 pillow-12.2.0 qrcode-8.2( `; ^9 S: n: p0 b W/ f
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.0 y% x4 g& z: D- U- c4 d: N
5 Z' i0 F K6 S4 v* O[notice] A new release of pip is available: 25.3 -> 26.0.1" U9 K2 y, W# }) x6 @
[notice] To update, run: /usr/local/python-3.13.10/bin/python3.13 -m pip install --upgrade pip
1 x. M, f) U9 j/ R7 A5 c! f# E7 ^
! F5 g3 r9 x6 T; {- ?- k
8 R: p( `. K& n: L- i, H# n1 d; r2 @1 g3 ~5 R$ ]
问题解决。, p F7 R2 \- w) u5 A- f7 _
' I D' n& V9 _, Y
4 @, n9 R/ L; b2 I+ i0 k
|
|