|
|
pip install mysqlclient- [- M) j' a7 [* i4 x
Collecting mysqlclient
% K$ e9 p: |- ~% Q+ {. q6 g$ D8 Q Using cached mysqlclient-2.2.4.tar.gz (90 kB)' B3 a! N7 v- j! F7 s5 z/ S5 K
Installing build dependencies ... done3 l5 K) v( @, V& U/ r/ l# V
Getting requirements to build wheel ... done
& X f' \9 U8 B2 [' E0 i Preparing metadata (pyproject.toml) ... done( X& r7 _2 l' f9 q) F' G
Building wheels for collected packages: mysqlclient
" t6 o! v6 }- | H5 g+ U9 { Building wheel for mysqlclient (pyproject.toml) ... error
4 }2 [6 Y8 Y" Y$ n4 _9 } error: subprocess-exited-with-error/ n3 s3 I) J: o y7 O/ Z: u
: q( ^3 h0 q4 p × Building wheel for mysqlclient (pyproject.toml) did not run successfully.; `& k. q/ l( }% R0 N
│ exit code: 1
: S R+ p3 Y; y5 k, i ╰─> [63 lines of output]+ g3 \/ q# W7 a2 z
# Options for building extension module:7 \6 R u1 R2 [% h- r' Q
extra_compile_args: ['-I/usr/include/mysql', '-std=c99']
1 ]! }% A5 c+ \- l7 u3 e3 m) w extra_link_args: ['-L/usr/lib/x86_64-linux-gnu']# i7 U$ m& D# }' y0 I
define_macros: [('version_info', (2, 2, 4, 'final', 0)), ('__version__', '2.2.4')]/ Z, n0 \8 ~( `! g/ G: e
running bdist_wheel
9 M2 w# |7 M. Q% N: Z+ t running build
$ R( I* a: l% O/ V k running build_py
% s: g/ I1 G; z& r0 P creating build
3 W8 l2 e Q# U) U, a& ~2 g9 c creating build/lib.linux-x86_64-cpython-312
: {- U# T8 y3 T9 J creating build/lib.linux-x86_64-cpython-312/MySQLdb: {4 }+ x3 O( W; T2 u& l3 Z
copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
; R& P s" @6 K' j' c* d copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
; A- W6 n2 e: o& Y# l- Z copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-312/MySQLdb# s0 a- f; o! R L
copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-312/MySQLdb: m! F$ [1 v$ m* X, M* J
copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-312/MySQLdb1 i! g$ K: E) d6 \4 E
copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
/ o/ e+ F$ I* a9 F* o% o+ c copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-312/MySQLdb' U1 G* u+ h: J$ E% _
creating build/lib.linux-x86_64-cpython-312/MySQLdb/constants, W1 f% p% q0 L& D5 r( M* D# a
copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants5 n, o) Q; u" L! `
copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
+ A% m9 T) W3 p3 { copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
: A, Z. B! e4 H( d- X2 t copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
& s9 W% k6 [. D5 K copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
1 m( X, G' X/ F7 g% C4 b$ r copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants0 e4 B, j8 t& A2 k" B+ _1 N
running egg_info' ]) v a- q. a1 L0 _
writing src/mysqlclient.egg-info/PKG-INFO5 V0 R, V6 e& d6 v; r, s# B
writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt
: e6 [" J% B6 V2 P1 O( x, x5 d, J writing top-level names to src/mysqlclient.egg-info/top_level.txt$ I+ {" B, M: Z6 s/ I
reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
4 k2 p4 A3 ^6 ?" K5 |# e reading manifest template 'MANIFEST.in'
3 Q8 X6 ^9 W3 w8 U2 D adding license file 'LICENSE'
T# B$ M U% `: A' b* c/ n writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
' o) g! Z8 C3 }, J3 W% i; l9 C copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-312/MySQLdb4 M- m: Y" _1 l; {1 S
running build_ext
9 v+ A0 M% u! W: O. y building 'MySQLdb._mysql' extension! R. q6 J: c/ ^& D4 s+ J" S2 R. T
creating build/temp.linux-x86_64-cpython-312' K6 L+ {" x. }
creating build/temp.linux-x86_64-cpython-312/src
7 `5 t- x6 P$ ~; o1 G# }) B creating build/temp.linux-x86_64-cpython-312/src/MySQLdb, f) n+ ]) o7 D
gcc -std=gnu11 -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC "-Dversion_info=(2, 2, 4, 'final', 0)" -D__version__=2.2.4 -I/usr/local/python312/include/python3.12 -c src/MySQLdb/_mysql.c -o build/temp.linux-x86_64-cpython-312/src/MySQLdb/_mysql.o -I/usr/include/mysql -std=c99
4 p3 Z. h5 g9 t, K src/MySQLdb/_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:& D3 C( G# o$ O4 p: J! q" P, W5 H6 O
src/MySQLdb/_mysql.c:539:44: 错误:‘MYSQL_OPT_SSL_KEY’未声明(在此函数内第一次使用)* H; Q6 i, g" z7 u# [. Y! Y; n- M
mysql_options(&(self->connection), MYSQL_OPT_SSL_KEY, key);7 M+ I. Q3 W2 c; v! M4 w2 Q
^* B- s5 V* V0 ?2 B* S
src/MySQLdb/_mysql.c:539:44: 附注:每个未声明的标识符在其出现的函数内只报告一次, J1 s9 y; p8 V; x
src/MySQLdb/_mysql.c:540:44: 错误:‘MYSQL_OPT_SSL_CERT’未声明(在此函数内第一次使用)5 G2 A4 L9 L: @* p
mysql_options(&(self->connection), MYSQL_OPT_SSL_CERT, cert);9 m: M$ x9 d/ i+ \
^, g2 i$ h! V# H8 K- K* D& y* c
src/MySQLdb/_mysql.c:541:44: 错误:‘MYSQL_OPT_SSL_CA’未声明(在此函数内第一次使用)
$ }# G0 L4 @: p6 B2 h! {4 f6 p mysql_options(&(self->connection), MYSQL_OPT_SSL_CA, ca);% s7 @! S0 U/ w6 A. J4 S6 X5 ]
^
0 ^! k( `4 z4 }( z src/MySQLdb/_mysql.c:542:44: 错误:‘MYSQL_OPT_SSL_CAPATH’未声明(在此函数内第一次使用)
3 j R& R; f9 t) E/ n mysql_options(&(self->connection), MYSQL_OPT_SSL_CAPATH, capath);
z* R: S# d7 a5 B* [$ e8 | ^/ p v; ^) a* e' H+ n# |) W) G) W
src/MySQLdb/_mysql.c:543:44: 错误:‘MYSQL_OPT_SSL_CIPHER’未声明(在此函数内第一次使用)5 h a1 v' J- \: X4 ?5 S. u
mysql_options(&(self->connection), MYSQL_OPT_SSL_CIPHER, cipher);6 O8 N7 s0 [- _: `% w
^
0 o" Y3 m% { S2 n9 H src/MySQLdb/_mysql.c:556:13: 警告:隐式声明函数‘mysql_optionsv’ [-Wimplicit-function-declaration]+ a& k7 V3 q; q& T+ `: U3 f" P4 n
mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);
1 D2 u/ z( v L W: M ^
6 I: u) e( k5 h4 A8 ?; o src/MySQLdb/_mysql.c:556:49: 错误:‘MYSQL_OPT_SSL_ENFORCE’未声明(在此函数内第一次使用)
1 J% @$ L# _ i/ }" P: k mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);
/ D4 P/ ^8 S: g9 X8 q( y y ^% {& |3 Y& {+ ?7 Q4 e; d7 y
error: command '/usr/bin/gcc' failed with exit code 1
+ Y$ e- ~; m, p [end of output]3 ]! M y4 Y( w, q6 i q6 z# T1 J
! O" @, P* @# ?. H4 J note: This error originates from a subprocess, and is likely not a problem with pip.6 ^ x" z# j5 {& J/ o& y
ERROR: Failed building wheel for mysqlclient; s6 U& M: ]: L" B x
Failed to build mysqlclient
$ O: R$ \ V" y1 ?3 [- PERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mysqlclient)' ^! h4 V1 E2 O" ]) q
" i/ j2 S; ^3 [5 D. r. X: z; c* i
3 r. ]1 y9 H& h0 d% P0 V
' @' Y# W" b0 ~# l) x: u6 |; l, t% [* m$ v; {5 n
解决方法:
* U( r$ w- o _: `" ?$ E
* Y% d" f. ]* q. Z; |降低mysqlclient 版本,替换mysqlclient-2.0.2 为1:# f) y, B5 G5 q% r0 T- }
3 T" q+ d# W' v+ z3 x
apache-airflow-providers-mysql==5.4.0
! U6 C7 E; Z0 C( I) [mysqlclient==2.1.0
8 M) j( L: C7 n! } s. H. g. P; b- i2 X& {1 c) `2 \) M4 H
2 R+ V5 ^8 b! I/ T# [- M
' A$ q& S1 g! c9 } |
|