|
|
Collecting mysqlclient
& o6 f- u7 e6 @: _ Downloading mysqlclient-2.2.8.tar.gz (92 kB)
2 n7 d0 p& h) k4 N$ J p/ N1 X Installing build dependencies ... done
. F/ `# \) J1 J/ }. V Getting requirements to build wheel ... error
( |; R# a- { B0 j: {8 P0 g; t error: subprocess-exited-with-error% [/ o- B6 [5 y- d% ?, k$ Y
) z1 S+ k" G) p- z" M) q
× Getting requirements to build wheel did not run successfully.! i" K3 a% \ T, N" y# L4 g% p
│ exit code: 1
& _+ e* l# V) G( \1 F- z7 r ╰─> [31 lines of output]# ]# B/ N I1 W) {2 u
Trying pkg-config --exists mysqlclient" Q! |4 m" @! x2 ]9 I; o; h
Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.
* K4 h6 b9 w, o, ~( d Trying pkg-config --exists mariadb7 e2 y$ F) ~% F# |9 e- p
Command 'pkg-config --exists mariadb' returned non-zero exit status 1.* F' D4 ~4 e; i$ E$ J: v# W
Trying pkg-config --exists libmariadb7 Q; g; b6 R+ [6 C, h( T
Command 'pkg-config --exists libmariadb' returned non-zero exit status 1.
1 q# ]# N5 @3 n9 g7 V2 ~ Trying pkg-config --exists perconaserverclient
1 B E) M1 Y# u Command 'pkg-config --exists perconaserverclient' returned non-zero exit status 1.2 C5 C6 C0 D5 x/ n
Traceback (most recent call last):
- {) ]6 g1 ~* U6 T3 ^! |& h 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>( X$ W/ E' p+ s! `6 n
main()) Y* [9 b, b+ f' B
~~~~^^
- i, C4 E3 I- j% I3 @ File "/usr/local/python-3.13.10/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main$ p6 ?" f+ R+ i5 T2 H$ C3 ?% A$ i
json_out["return_val"] = hook(**hook_input["kwargs"])
9 f, U- v7 I4 T* D ~~~~^^^^^^^^^^^^^^^^^^^^^^^^0 t6 U5 {; Y* l% p8 O5 |5 m1 b! @
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
1 h* x; Y. x' |/ q7 ?# `6 b return hook(config_settings)
$ Q9 \0 U& z6 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; ^" C6 o8 V0 F8 o" C! w
return self._get_build_requires(config_settings, requirements=[])
: Y0 i& g+ a. F! ^* J* Q ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^% i5 G$ x- p) [/ F
File "/tmp/pip-build-env-y6iocmfk/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires/ Y. f* U9 e! V( }
self.run_setup()
& g3 r# y; r0 V8 i5 b4 x ~~~~~~~~~~~~~~^^
7 V0 @0 n0 m: c) Y, v& j File "/tmp/pip-build-env-y6iocmfk/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 317, in run_setup
2 q* E* r e1 ~& j exec(code, locals())
( t* Y9 @# P9 U; r; A" p- k' ` ~~~~^^^^^^^^^^^^^^^^+ [& d( H( c5 u/ L F& Y: r' T
File "<string>", line 156, in <module>
1 Z9 ?2 h5 Y4 @6 B# _' a" ^ File "<string>", line 49, in get_config_posix
* j' s# b- E3 ~8 l1 `; O File "<string>", line 28, in find_package_name
0 W1 m. |. ]% e1 P2 T: q5 [ Exception: Can not find valid pkg-config name.- i& A& u; k3 J# C
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually. J* _8 T* t3 F1 k$ T
[end of output] z; w' I9 F0 E V! C' h
( y0 X; Z [* G) ?* Q D/ h* { note: This error originates from a subprocess, and is likely not a problem with pip.: P8 y4 r9 j! Q
6 o7 q& K! Y' H* {4 Y4 O[notice] A new release of pip is available: 25.3 -> 26.0.1
g9 |7 {$ @% `[notice] To update, run: /usr/local/python-3.13.10/bin/python3.13 -m pip install --upgrade pip
0 _2 |6 m F7 m$ }. ^$ p8 W' A2 SERROR: Failed to build 'mysqlclient' when getting requirements to build wheel
4 N! E) ^; j' A* J( Z. L2 F1 i. t8 G$ e: Q# {0 \7 ^. O. k
8 m7 S0 v' P7 W0 e8 U, x) L4 U. _6 E
解决办法:
4 Z& i- z# r9 [3 |2 a% T1 d安装相关的包:; R+ Q3 J# w" j1 a8 B, Y( }, N
dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config
, \: S7 E. g* h% J/ d# Q7 o: }. W
5 x" s/ E3 f$ F5 }+ H5 Q; W
) O M3 ]' X$ w+ \# M. v* uDownloading Packages:# X; t1 j3 J: P3 C. X; y( I
[SKIPPED] platform-python-devel-3.6.8-41.el8.x86_64.rpm: Already downloaded ) L$ H1 U( x7 p) q y- V9 B
[SKIPPED] python-rpm-macros-3-41.el8.noarch.rpm: Already downloaded 5 t& r5 C$ U" Q& k
[SKIPPED] python-srpm-macros-3-41.el8.noarch.rpm: Already downloaded
. Y3 E! Z' W/ P* ^+ T[SKIPPED] python3-rpm-generators-5-7.el8.noarch.rpm: Already downloaded
& Z1 k: \3 @# P- i[SKIPPED] python3-rpm-macros-3-41.el8.noarch.rpm: Already downloaded 3 {8 p/ z3 }' c# n3 p7 {7 P
[SKIPPED] python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64.rpm: Already downloaded
& v2 r) P6 D$ C- |4 O2 x: m[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]: m% x1 o, q9 ` I( p1 J# a
[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]
2 D! e- F+ S- 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]* \# C% b0 G; m( y5 [6 Q( c# c- {9 [
[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]
& H* F3 p& f& z( Z1 k! [[FAILED] MariaDB-devel-12.2.2-1.el8.x86_64.rpm: No more mirrors to try - All mirrors were already tried without success
; e% r, v) S. t2 x/ @4 R& n: H- K" E
) F+ I- q9 \! E5 U" u; FThe downloaded packages were saved in cache until the next successful transaction.
2 K0 S5 C& Q; NYou can remove cached packages by executing 'dnf clean packages'.5 `5 T: V; {' w
Error: Error downloading packages:5 [( j& T/ ~9 W G" O1 }
Cannot download rpms/MariaDB-devel-12.2.2-1.el8.x86_64.rpm: All mirrors were tried% S" m: y1 b; k1 P: d0 J
(assetvenv) [root@asset ~]# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config% k! N) U* G; e* ]2 g4 D
MariaDB Server 0.0 B/s | 0 B 00:01
" w8 {% t4 X! ^8 d6 yErrors during downloading metadata for repository 'mariadb-main':
8 ]4 K+ R1 Y2 ], c7 V9 J: k - 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]
. j9 o4 g9 ]2 n4 I& iError: Failed to download metadata for repo 'mariadb-main': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
2 @3 R5 O9 A4 c0 G! K
, u5 e/ x8 }5 A& e! @
/ W% v% [" S) p. k2 `$ I# v又报错:! u& `# Z$ C8 q
& S1 n' p" c$ T& y8 J
因为时间不同步,调整下时间即可:
& L7 o1 t" m" K' s9 l. @
, q' e/ _. w! `# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config
9 c. ~2 r4 J: h3 B4 J; v1 X/ KMariaDB Server 0.0 B/s | 0 B 00:01
% I5 {! ^" C+ K# s: vErrors during downloading metadata for repository 'mariadb-main':
% N' }. J$ d3 d0 N( D% M3 j' z - 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]
# h4 o' k6 L' EError: Failed to download metadata for repo 'mariadb-main': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
: g! o, \# v; k! w% j1 ?0 Z* W( Y(assetvenv) [root@asset ~]# date -s 4/9
& O1 d! u7 O q6 r# v" H) R4 j8 WThu Apr 9 00:00:00 CST 2026, a6 ^0 F6 o) T; w9 T* ?7 }
(assetvenv) [root@asset ~]# date -s 15:56:00$ r C0 _; C9 U) @# @: ~" ~- a
Thu Apr 9 15:56:00 CST 2026
# D# C$ @" \" [- h6 q(assetvenv) [root@asset ~]# dnf install -y gcc python3-devel mariadb-connector-c-devel pkg-config* L! U7 L% `3 K: |1 y0 N4 s
Last metadata expiration check: 4:35:55 ago on Thu 09 Apr 2026 11:20:08 AM CST.& m8 g1 [* V0 m5 }
Package gcc-8.5.0-4.el8_5.x86_64 is already installed.
# O. s, o+ h- c3 hPackage pkgconf-pkg-config-1.4.2-1.el8.x86_64 is already installed.2 }& Q8 P& l+ G% m. N
Dependencies resolved.
' f4 n2 z" R( }* z$ U5 C. Y================================================================================================================================================================
M" a% S6 \3 {% x Package Architecture Version Repository Size
* g: F/ [5 F. g! N: ^================================================================================================================================================================
& Y* G9 D1 c1 S5 |9 M; u3 uInstalling:
" }4 X+ ~* K3 d3 O. Y MariaDB-devel x86_64 12.2.2-1.el8 mariadb-main 9.1 M5 _# \% {. u w' a$ d
python36-devel x86_64 3.6.8-38.module_el8.5.0+895+a459eca8 AppStream 16 k
; I! ?$ k2 U& {/ Z+ EInstalling dependencies:1 e- m N' v: A+ D" @/ i+ P
platform-python-devel x86_64 3.6.8-41.el8 AppStream 249 k
2 }! P1 Z5 t1 y b! B2 u, [ python-rpm-macros noarch 3-41.el8 AppStream 15 k
7 g: v% u: E9 ^1 k! @8 k0 t: i2 Z3 v python-srpm-macros noarch 3-41.el8 AppStream 15 k0 c' J) G5 y9 S
python3-rpm-generators noarch 5-7.el8 AppStream 25 k
. C. v% m T) m3 e+ u D' q: | python3-rpm-macros noarch 3-41.el8 AppStream 14 k
! l; e9 C1 ]) y5 n5 M
" J; E" | S9 [7 N# \$ [7 @Transaction Summary: `: I B. u- d
================================================================================================================================================================+ Q6 A( b/ p, l$ |
Install 7 Packages; l6 y5 a3 J" ?* X4 T7 ~
& \3 b# d$ f Z: RTotal size: 9.4 M
2 B! F$ h; N7 q1 vTotal download size: 9.1 M9 Z+ _# Y0 z9 k" U6 `" j* |1 Z
Installed size: 59 M
6 a; P5 X0 O. ^0 JDownloading Packages:
, Q' k0 |4 X1 B6 v2 |( ]) [1 h- e4 C, _[SKIPPED] platform-python-devel-3.6.8-41.el8.x86_64.rpm: Already downloaded
. z$ M# a7 G# V0 ?[SKIPPED] python-rpm-macros-3-41.el8.noarch.rpm: Already downloaded
" I: q5 W- q3 s[SKIPPED] python-srpm-macros-3-41.el8.noarch.rpm: Already downloaded 4 K. T; Y( k9 j+ q5 |
[SKIPPED] python3-rpm-generators-5-7.el8.noarch.rpm: Already downloaded 8 ~. X I1 q5 B5 ]) f: @
[SKIPPED] python3-rpm-macros-3-41.el8.noarch.rpm: Already downloaded 7 G( j5 U" A1 ]* w
[SKIPPED] python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64.rpm: Already downloaded 0 c% x: H) _' p+ x, R
(7/7): MariaDB-devel-12.2.2-1.el8.x86_64.rpm 3.7 MB/s | 9.1 MB 00:02 + l% H* ~% k Q6 Q
----------------------------------------------------------------------------------------------------------------------------------------------------------------: g: H e% l# k3 H. S
Total 3.6 MB/s | 9.1 MB 00:02
# v! j# k" H' }$ L9 X7 oRunning transaction check1 T% s/ u( j/ O3 m) S
Transaction check succeeded.. Y. r/ J4 n) ?
Running transaction test
" u5 C- W; b& X' p3 Q8 n ? lTransaction test succeeded.: J3 K% Y0 ] J5 t6 |
Running transaction( @: J1 H" O; C+ g
Preparing : 1/1
+ h8 T8 g( A5 R9 X+ k1 c% B Installing : python3-rpm-generators-5-7.el8.noarch 1/7 7 D* x/ R- ?# Y9 |0 i
Installing : python-srpm-macros-3-41.el8.noarch 2/7 ' A/ |7 h- Y7 U% G9 r# y0 R
Installing : python-rpm-macros-3-41.el8.noarch 3/7
/ o7 j' {7 f; J, ~ Installing : python3-rpm-macros-3-41.el8.noarch 4/7 8 Y1 Y' N1 r* s
Installing : platform-python-devel-3.6.8-41.el8.x86_64 5/7 9 z" O* b4 ~* n8 n$ u
Installing : python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 6/7
! F; [4 M/ |. c* Q$ z# e5 u Running scriptlet: python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 6/7
" R3 v) [( P" f; B6 q6 I5 X3 E0 w Installing : MariaDB-devel-12.2.2-1.el8.x86_64 7/7
" e: K' a0 D8 C) K1 I9 @9 O Running scriptlet: MariaDB-devel-12.2.2-1.el8.x86_64 7/7
' G0 @ T7 i$ Z& B/ c Verifying : platform-python-devel-3.6.8-41.el8.x86_64 1/7 $ s& z4 I4 }& G- u% Z: o
Verifying : python-rpm-macros-3-41.el8.noarch 2/7 8 ^. b/ F5 g# ~% _& r
Verifying : python-srpm-macros-3-41.el8.noarch 3/7
! l+ g! G; ?$ }# }- @" _. [ Verifying : python3-rpm-generators-5-7.el8.noarch 4/7
! o4 f5 C y; _8 C) w# L Verifying : python3-rpm-macros-3-41.el8.noarch 5/7
$ D- O& M# `# B' r Verifying : python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 6/7
7 k% E9 x. F9 j' s Verifying : MariaDB-devel-12.2.2-1.el8.x86_64 7/7
0 Z; w6 g9 B2 f- }( b5 D6 Y2 {1 D _9 Z; ~4 ?) {
Installed:, M; x! Q5 J" q* s
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 0 e/ ^8 c: L5 T' o
python-srpm-macros-3-41.el8.noarch python3-rpm-generators-5-7.el8.noarch python3-rpm-macros-3-41.el8.noarch
: E. r# Z1 k- R python36-devel-3.6.8-38.module_el8.5.0+895+a459eca8.x86_64 5 p. p0 S! p( _6 |& m3 @
# ?3 W% P' s0 t0 oComplete!6 c ?$ ?+ f" Y8 o1 E, }0 A
# T' u* l3 k0 f% R2 [( t/ [+ l) u4 u& }" ^# @" P) ~5 o5 _% r
再次安装: X, _* |4 e+ [5 W3 F
4 R% S1 B/ L3 C: R1 E& @1 X$ O5 F+ Y6 b! x! i) i5 S' \& W
# pip install django==6.0 mysqlclient django-cors-headers openpyxl qrcode pillow
C4 ~9 c' g3 TRequirement already satisfied: django==6.0 in /usr/local/python-3.13.10/lib/python3.13/site-packages (6.0)
1 j4 M8 L% \9 SCollecting mysqlclient
/ i f, l' P1 Z: q: s Using cached mysqlclient-2.2.8.tar.gz (92 kB)
3 e5 e0 E% Z; m5 k( _& b Installing build dependencies ... done
: ]; f2 j' S8 M9 _7 l6 M7 b5 j: H Getting requirements to build wheel ... done/ r9 u: L I% Y1 D: l3 ^; R
Preparing metadata (pyproject.toml) ... done1 L" T' T P' m" u# j2 |3 X
Collecting django-cors-headers
b( Y# L! l( P- z8 ` Downloading django_cors_headers-4.9.0-py3-none-any.whl.metadata (16 kB)
J7 u9 [% S& L1 t Y; g7 W/ KCollecting openpyxl( O. d# F% s! n& c! \
Downloading openpyxl-3.1.5-py2.py3-none-any.whl.metadata (2.5 kB)
$ ~' l( X4 w F7 [. vCollecting qrcode
" @; R3 l6 m' w' p, H Downloading qrcode-8.2-py3-none-any.whl.metadata (17 kB)
1 X& W. T& a7 v H+ R! DCollecting pillow
- T, r: Y0 x- u2 i Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (8.8 kB)8 X7 \: h8 Q: H7 m4 _3 b
Requirement 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)
3 \* F4 l0 P. B' m3 R. ~2 d( K oRequirement 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)
5 K( z$ p7 w" Q0 n9 E+ rCollecting et-xmlfile (from openpyxl)+ W B$ m2 z# h6 m0 m7 o7 o
Downloading et_xmlfile-2.0.0-py3-none-any.whl.metadata (2.7 kB). r; o \7 d: f% @
Downloading django_cors_headers-4.9.0-py3-none-any.whl (12 kB)( r9 U' B) ]7 }$ B& j# x: b3 |
Downloading openpyxl-3.1.5-py2.py3-none-any.whl (250 kB)& g% D5 o3 ~: E% j
Downloading qrcode-8.2-py3-none-any.whl (45 kB)7 Y0 }# l: r/ e1 Y% w( b
Downloading pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.1 MB)! h9 d0 E! A* t: \2 |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.1/7.1 MB 6.3 MB/s 0:00:01
' E5 a1 k' `' G9 z, p# SDownloading et_xmlfile-2.0.0-py3-none-any.whl (18 kB)
7 u) v7 K- b1 L! K9 [2 P6 PBuilding wheels for collected packages: mysqlclient/ ^+ z/ Z) F& _8 y' P" _% [
Building wheel for mysqlclient (pyproject.toml) ... done3 f0 a8 d( K" Z/ |
Created wheel for mysqlclient: filename=mysqlclient-2.2.8-cp313-cp313-linux_x86_64.whl size=142572 sha256=2c46fc0c29d6e5974f6df057c8ddc59273f914b5f188d7b885976d5286e9cc53
2 W1 D1 z% Z% v Stored in directory: /root/.cache/pip/wheels/f8/e5/67/017f03738b3b81b2a504661f31a9fb909e452d7740aab517bb. u4 J) Q( D' M) r
Successfully built mysqlclient6 i! I$ e7 c2 h
Installing collected packages: qrcode, pillow, mysqlclient, et-xmlfile, openpyxl, django-cors-headers
K. w. w. V, `; K% K% wSuccessfully 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, l7 T% M% K% K: j
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.% t6 t' l6 t6 b; ] N! ?9 D; G6 X
: ?! X5 Y& a: O[notice] A new release of pip is available: 25.3 -> 26.0.1& |1 a/ O T8 n5 ]: ?: A
[notice] To update, run: /usr/local/python-3.13.10/bin/python3.13 -m pip install --upgrade pip$ l6 M% c' n9 q% f8 l: ^/ s
- s* ~/ W4 {9 p! C% I) x
& J& [6 W1 m, B1 P$ Z
n0 h4 ^" O4 x- L$ ~
问题解决。
* W- l3 ] d. o3 \$ o0 V# \; V* h+ O7 e" ~+ B: S0 c
1 C* R( u3 I1 B! @8 O# F- k ], y
|
|