|
|
pip install mysqlclient4 v. N# V+ w# Z0 t4 G2 M' }
Collecting mysqlclient
+ V: Q7 f6 ^* ]4 P( ]/ Q+ X6 g7 u Using cached mysqlclient-2.2.4.tar.gz (90 kB)
& D: n g- M8 K Installing build dependencies ... done$ Z" _3 H1 R# w8 M/ o
Getting requirements to build wheel ... done
: b2 B2 q! k+ W Preparing metadata (pyproject.toml) ... done+ Q% b3 _. \- V: @' [0 k
Building wheels for collected packages: mysqlclient# w1 r+ T) n9 y3 `8 `" g
Building wheel for mysqlclient (pyproject.toml) ... error- ~4 v( N" v( z, C, r
error: subprocess-exited-with-error3 [' n4 J3 Q& B" F; a
& A" P3 }9 b* m+ i) i' {
× Building wheel for mysqlclient (pyproject.toml) did not run successfully.! W; R2 Z E8 d( Q: Y- h5 a! U! i
│ exit code: 1
. o, O& L9 |, @ ╰─> [63 lines of output]
* d8 `/ C; T4 f$ n1 Q2 g # Options for building extension module:% n( E& H& }7 N5 W3 N" P# p
extra_compile_args: ['-I/usr/include/mysql', '-std=c99']
/ s9 X! M3 ]: f$ P1 [, r( P extra_link_args: ['-L/usr/lib/x86_64-linux-gnu']
; g; U6 V6 ^8 n7 X* N define_macros: [('version_info', (2, 2, 4, 'final', 0)), ('__version__', '2.2.4')]6 e- w$ B; Y% h0 y, T
running bdist_wheel
8 ~- {6 K' Y# a/ g- B0 E5 } running build5 i* o# |3 K' Q' F! K6 i' ~
running build_py
3 b2 _" r }/ h c creating build' F2 R5 o; |# ~) X( R+ Y! t" s1 T2 X
creating build/lib.linux-x86_64-cpython-312
4 [5 I- P( }4 K! Z; L3 B creating build/lib.linux-x86_64-cpython-312/MySQLdb* B% B2 z+ V6 W E. }( e
copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb9 A9 m% I- \2 O( A1 R6 o% C2 {0 P
copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-312/MySQLdb4 ^4 y% m6 R7 b* X% F
copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-312/MySQLdb! B. R( l, B* |# _' @& N
copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-312/MySQLdb. a v0 R2 q z1 S
copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
+ o* I" V1 p' m. L, _! C copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-312/MySQLdb9 h$ @6 O5 B( G8 x* a+ B* S- v6 \9 j! u
copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
" }4 c4 O- {3 P! {7 a creating build/lib.linux-x86_64-cpython-312/MySQLdb/constants
1 T3 T. F$ p3 P7 U copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
. H% e2 _$ d+ @ i' G copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
9 F; ?5 z% n" H' Y- H copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants7 o& e( j7 ~) |" A& B' ]
copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants C3 \% R8 T# l3 `
copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants- W8 ~: S7 `" l3 B I1 \
copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
- l; d* c8 M8 k4 M4 m8 ]0 _6 W running egg_info
+ d$ Y ?( K# x ~ writing src/mysqlclient.egg-info/PKG-INFO
8 k4 C4 z0 y0 L7 n0 J2 Z. k writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt$ A& k" v8 A- ~4 t y% x- Z1 t
writing top-level names to src/mysqlclient.egg-info/top_level.txt
. a" A& \" U/ w( [) I% f+ X# y9 |/ C reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'. k& U/ X& l7 Z! w5 u3 Q+ r
reading manifest template 'MANIFEST.in'. R# Z! B0 D- k7 K
adding license file 'LICENSE'
" r! g( p* P1 {; u0 I writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
" l" ?6 i0 d- w) H# V$ e copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-312/MySQLdb
9 d' ^% g4 I; w; }$ a+ @ running build_ext) p& ?) A+ d/ ` b* R+ R# g
building 'MySQLdb._mysql' extension
O6 S* ^8 P( c6 `' u& @5 C creating build/temp.linux-x86_64-cpython-312
* H- j! O L* K. M6 u. ` creating build/temp.linux-x86_64-cpython-312/src
4 L: b8 C0 |( b0 }8 k creating build/temp.linux-x86_64-cpython-312/src/MySQLdb% f4 a, p& P) @1 V
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=c995 p; H. A$ G1 ?8 @6 S
src/MySQLdb/_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:1 N E3 G& ]! D0 M0 e
src/MySQLdb/_mysql.c:539:44: 错误:‘MYSQL_OPT_SSL_KEY’未声明(在此函数内第一次使用)
+ f" z( x# I" X* B( A8 a5 X5 a1 G mysql_options(&(self->connection), MYSQL_OPT_SSL_KEY, key);% v/ m+ ]" m" [) `4 X- b
^
+ e% L; p: \: f, ]+ t) G src/MySQLdb/_mysql.c:539:44: 附注:每个未声明的标识符在其出现的函数内只报告一次
% [/ T/ m0 W) p& A5 o8 p; X src/MySQLdb/_mysql.c:540:44: 错误:‘MYSQL_OPT_SSL_CERT’未声明(在此函数内第一次使用)3 C& P* F2 ]+ U6 E1 h! }' b6 E
mysql_options(&(self->connection), MYSQL_OPT_SSL_CERT, cert);; v9 d3 y; Y' K# ^1 [0 Z
^
$ W! v7 K8 Y5 o src/MySQLdb/_mysql.c:541:44: 错误:‘MYSQL_OPT_SSL_CA’未声明(在此函数内第一次使用)6 h: {" z D. S* m' Y/ h, E4 R& e
mysql_options(&(self->connection), MYSQL_OPT_SSL_CA, ca);( @( h6 Y# d! `$ F) T9 |
^" g" Z) l2 U2 U; }9 X
src/MySQLdb/_mysql.c:542:44: 错误:‘MYSQL_OPT_SSL_CAPATH’未声明(在此函数内第一次使用)
. N# P% m/ t# x* F/ L u mysql_options(&(self->connection), MYSQL_OPT_SSL_CAPATH, capath);
0 ~! O. v9 ~. ^2 Y; W. u ^
' \/ W4 K! ?3 K, l src/MySQLdb/_mysql.c:543:44: 错误:‘MYSQL_OPT_SSL_CIPHER’未声明(在此函数内第一次使用)2 q6 G7 n' \4 Y, d! ^! ]& m
mysql_options(&(self->connection), MYSQL_OPT_SSL_CIPHER, cipher);' a; z) @3 t( J+ N
^
( _7 n/ i9 y) K8 k$ X1 d* Q src/MySQLdb/_mysql.c:556:13: 警告:隐式声明函数‘mysql_optionsv’ [-Wimplicit-function-declaration]( |% f6 w9 ~; G
mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);
' q. N0 ^# H6 y3 I" x* O3 U ^
9 Y) K1 q% O' W! X( S; {. H1 W src/MySQLdb/_mysql.c:556:49: 错误:‘MYSQL_OPT_SSL_ENFORCE’未声明(在此函数内第一次使用)5 E B- z: r% ?$ ]- I
mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls); v2 T1 O. G& D
^
) U, k2 o6 G3 m( M- }& D error: command '/usr/bin/gcc' failed with exit code 1
2 Q) _* G/ n2 c0 ~- r [end of output], v1 a. s* P A/ g2 p, R+ `
4 S1 n% R( f- R- f# h
note: This error originates from a subprocess, and is likely not a problem with pip.
" d K' w6 y; K$ `* W ERROR: Failed building wheel for mysqlclient$ D& Y5 z+ X/ y
Failed to build mysqlclient" ~3 n: G. Z% S
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mysqlclient); y) g& N, ?% e+ ~/ W4 l. \
! Q5 U! t% X5 h7 o% I
1 e$ G( D3 C, X2 @, _) h
; d% `. `( s* h% \. |3 `5 k* W
8 F- ^# v* G) S" E5 Y; E解决方法:
9 \2 }3 L R5 y6 O8 D' t
, s* I5 ]* R* _& E6 \, x$ Z降低mysqlclient 版本,替换mysqlclient-2.0.2 为1:; K/ k) O, e) R
# g' P" g, C. R3 J
apache-airflow-providers-mysql==5.4.0
3 _, k/ e4 u4 A- u l! W2 Gmysqlclient==2.1.0
+ h# _* V/ d* N @2 @( S" y3 f' Y3 @- k- H
2 S8 @, y& y: z
' W, ?- e0 G6 X* b3 ~$ J9 {# E |
|