|
|
pip install mysqlclient$ i+ q+ l* D* B" B1 ]% c: U6 H
Collecting mysqlclient
2 c3 L2 z1 w9 ?" S5 X+ w Using cached mysqlclient-2.2.4.tar.gz (90 kB)+ t% I8 Z8 |4 k/ A
Installing build dependencies ... done$ y7 `8 C' W# O
Getting requirements to build wheel ... done
1 j: J$ i d. g5 t ^, o Preparing metadata (pyproject.toml) ... done
3 l/ n+ k$ o5 U) ^; mBuilding wheels for collected packages: mysqlclient. P ?9 @& E ~( ?1 o. V
Building wheel for mysqlclient (pyproject.toml) ... error
$ J+ u, x% `" q+ m9 ^! l& T% N# ` error: subprocess-exited-with-error3 b. [* m+ H7 S Q1 ?5 i- T
) [ T6 Q8 J ~/ ~% V0 {/ t
× Building wheel for mysqlclient (pyproject.toml) did not run successfully.7 L2 u5 F# f1 I- q' i
│ exit code: 1! _# A/ J8 A" G J+ p$ W
╰─> [63 lines of output]$ v6 G- x3 a% u! S% d d& `
# Options for building extension module: K$ `! O3 e M8 l) g+ q7 q
extra_compile_args: ['-I/usr/include/mysql', '-std=c99']8 Z! N6 H) D4 Z, X9 b% o5 s% Y4 g* P
extra_link_args: ['-L/usr/lib/x86_64-linux-gnu']4 \* i% U" [, s1 }" D
define_macros: [('version_info', (2, 2, 4, 'final', 0)), ('__version__', '2.2.4')]: y! D) z9 H% _0 E) k' ?
running bdist_wheel# z9 N9 L* G! ?% `3 z+ ]
running build
$ H! V; h0 p2 Z- }0 { running build_py4 T* p; ^2 }2 D) b
creating build. E' W" V9 E! V6 D& Y( B" P/ l; f
creating build/lib.linux-x86_64-cpython-312" E/ M5 f0 s) j, p, c- b! E# T x
creating build/lib.linux-x86_64-cpython-312/MySQLdb f" A' R0 v- l! Y' k$ R) r' V
copying src/MySQLdb/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
9 ~) v+ m# X. F2 k& L5 i6 v+ F copying src/MySQLdb/_exceptions.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
. _8 L4 _% O3 l copying src/MySQLdb/connections.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
: V! b6 V7 d1 `9 A; ^- T5 T# m: ~ copying src/MySQLdb/converters.py -> build/lib.linux-x86_64-cpython-312/MySQLdb+ Q( I( G5 f. X$ r' t. \0 n% @
copying src/MySQLdb/cursors.py -> build/lib.linux-x86_64-cpython-312/MySQLdb
Q( Q# y3 ^9 ^: `+ |. [- V copying src/MySQLdb/release.py -> build/lib.linux-x86_64-cpython-312/MySQLdb" }9 }5 C# |2 C
copying src/MySQLdb/times.py -> build/lib.linux-x86_64-cpython-312/MySQLdb+ T0 L- ^5 s) I. Y# z- N
creating build/lib.linux-x86_64-cpython-312/MySQLdb/constants
- h4 R# V. K2 h: V copying src/MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
" v, l) R: ]( \! i9 j copying src/MySQLdb/constants/CR.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
y N$ [2 k/ U; l7 n0 {6 C8 \ copying src/MySQLdb/constants/ER.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants, v }0 U# \* O$ d6 w2 `
copying src/MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants
- ?8 a. Y |& i7 L' Y1 j- j- I v copying src/MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants& }# _2 N+ i3 t% Z( p4 {. D$ H2 Z
copying src/MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-cpython-312/MySQLdb/constants0 h' r/ x. }# e4 ?' Z
running egg_info
3 b& N$ r: j; ?( e! L4 u writing src/mysqlclient.egg-info/PKG-INFO
, w% r# k& p) Y+ [- P6 U# I3 L' A6 I writing dependency_links to src/mysqlclient.egg-info/dependency_links.txt
7 ^! t8 z+ t/ Q$ Q; }; p: ? writing top-level names to src/mysqlclient.egg-info/top_level.txt
: Z8 ^7 {1 O n1 n9 Z% p/ f7 Y reading manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
4 q5 W% E1 i! Y$ Z' L+ _% D reading manifest template 'MANIFEST.in'
/ }+ f. ]/ v, ~2 f/ C4 ] adding license file 'LICENSE'* E8 Y& U1 h6 U: I" s" n
writing manifest file 'src/mysqlclient.egg-info/SOURCES.txt'
; l% }8 u" w7 h copying src/MySQLdb/_mysql.c -> build/lib.linux-x86_64-cpython-312/MySQLdb
6 l& I* j: M- X3 c, Y! O6 e" n running build_ext
/ q! y! d5 K& z4 W! c+ S building 'MySQLdb._mysql' extension
, T- T4 j- h2 V. l6 z creating build/temp.linux-x86_64-cpython-312
( a0 D4 p8 |8 e5 m& d7 ~ creating build/temp.linux-x86_64-cpython-312/src) x( F: y7 k( n% }/ f w) J" G
creating build/temp.linux-x86_64-cpython-312/src/MySQLdb
' `( i0 _6 ^3 g% n- J 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! K+ u! v, U% A4 @0 g, V
src/MySQLdb/_mysql.c: 在函数‘_mysql_ConnectionObject_Initialize’中:2 ]1 j1 J4 R8 C- g9 b
src/MySQLdb/_mysql.c:539:44: 错误:‘MYSQL_OPT_SSL_KEY’未声明(在此函数内第一次使用)
" I3 {9 O$ B' C" c" C; t mysql_options(&(self->connection), MYSQL_OPT_SSL_KEY, key);4 q2 h: T8 o% \8 v
^
1 J( U* r# R8 O8 z src/MySQLdb/_mysql.c:539:44: 附注:每个未声明的标识符在其出现的函数内只报告一次! A! |% U$ P0 M: W$ m
src/MySQLdb/_mysql.c:540:44: 错误:‘MYSQL_OPT_SSL_CERT’未声明(在此函数内第一次使用)
( o( [3 F% f- c& i* @+ y( W3 i# f mysql_options(&(self->connection), MYSQL_OPT_SSL_CERT, cert);
2 U: H* i$ E* B1 M% L$ H5 Q ^+ p: e1 ]& [/ ^( O& P' _
src/MySQLdb/_mysql.c:541:44: 错误:‘MYSQL_OPT_SSL_CA’未声明(在此函数内第一次使用)) L% _1 B2 I9 Y( N! M
mysql_options(&(self->connection), MYSQL_OPT_SSL_CA, ca);
4 ^% H2 s# L0 H; p ^, v; V. s# B8 K x& Z
src/MySQLdb/_mysql.c:542:44: 错误:‘MYSQL_OPT_SSL_CAPATH’未声明(在此函数内第一次使用)
4 N, S: Y" F! y) j7 }* F mysql_options(&(self->connection), MYSQL_OPT_SSL_CAPATH, capath);
7 [/ w/ y# k: v$ I; k/ t( l ^ k$ y E- `1 g- X
src/MySQLdb/_mysql.c:543:44: 错误:‘MYSQL_OPT_SSL_CIPHER’未声明(在此函数内第一次使用)7 Z% k# u: @* ]7 |
mysql_options(&(self->connection), MYSQL_OPT_SSL_CIPHER, cipher);
9 K- j& V/ `) b" N3 G! F ^
' M' _7 F% O$ t& w( H: P3 } src/MySQLdb/_mysql.c:556:13: 警告:隐式声明函数‘mysql_optionsv’ [-Wimplicit-function-declaration]
- m) \; E; |( ^4 _0 g mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);
4 X+ R9 x* O z l+ H$ ~ ^" K7 y( e" ?* `7 x* `
src/MySQLdb/_mysql.c:556:49: 错误:‘MYSQL_OPT_SSL_ENFORCE’未声明(在此函数内第一次使用)1 r. l1 n' K: B; m& E/ y
mysql_optionsv(&(self->connection), MYSQL_OPT_SSL_ENFORCE, (void *)&enforce_tls);' y. w6 y6 {0 \( |
^/ A2 t# Z; n: R: S5 k
error: command '/usr/bin/gcc' failed with exit code 1) H5 m; W0 z6 m- E
[end of output]: c) i0 s- j0 R. G& g
j& K" O6 y6 a; o0 v$ W- A1 `
note: This error originates from a subprocess, and is likely not a problem with pip.
* y1 M6 X2 D6 {( J- g ERROR: Failed building wheel for mysqlclient
5 i) ^: f7 A6 m- u' s" y' eFailed to build mysqlclient
& F6 F, B( ]' f; O* _2 zERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mysqlclient)
# x V0 f' e9 ?
+ V }9 }$ y. P$ g; Z7 G/ W; ?% c' g/ t" x0 a* B6 N: S4 {' z2 R
0 s6 A0 T& ~# J0 n
7 a' \/ @' p# H; ]3 L) z/ S
解决方法:
9 y7 H1 n- C% R- z, S! X0 t# W5 w/ z6 `: b7 a
降低mysqlclient 版本,替换mysqlclient-2.0.2 为1:. x$ u/ t* \# @% J; A
# L% e9 B6 r! t" h, `
apache-airflow-providers-mysql==5.4.0: I& k2 R$ @/ Z& R- s
mysqlclient==2.1.0 \3 l/ k Y# N! v4 ]
. A& f9 B1 X$ F8 o9 V
; z( q, d, S. c. a8 ?. b
4 ~; Q6 ]. t; _* I3 o4 H! N8 S V
|
|