반응형
에러메세지
$ airflow initdb
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/airflow", line 25, in <module>
from airflow.configuration import conf
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/__init__.py", line 47, in <module>
settings.initialize()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/settings.py", line 405, in initialize
configure_orm()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/airflow/settings.py", line 294, in configure_orm
engine = create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sqlalchemy/engine/__init__.py", line 525, in create_engine
return strategy.create(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 118, in dbapi
return __import__("MySQLdb")
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/MySQLdb/__init__.py", line 18, in <module>
import _mysql
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_mysql.cpython-38-darwin.so, 2): Library not loaded: @rpath/libmysqlclient.21.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/_mysql.cpython-38-darwin.so
Reason: image not found
Mysql의 이미지 위치를 찾지 못해 난 에러.
다음 환경설정을 추가한다.
다음 경로에 mysql 이 설치되어 있는지 확인
$ cd /usr/local/mysql/lib
$ ls
libcrypto.1.1.dylib libmysqlclient.a libprotobuf-lite.3.11.4.dylib libprotobuf.dylib mecab
libcrypto.dylib libmysqlclient.dylib libprotobuf-lite.dylib libssl.1.1.dylib pkgconfig
libmysqlclient.21.dylib libmysqlservices.a libprotobuf.3.11.4.dylib libssl.dylib plugin
위 경로를 환경변수에 등록
(.zshrc, .bash_profile, .bashrc 등에 등록)
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
다시 수행
$ airflow initdb
끝.
반응형
'공부 > 프로그래밍' 카테고리의 다른 글
[java] 요청한 IP주소 받기(nginx proxy 환경, AWS ELB 등) (0) | 2021.07.02 |
---|---|
[springboot, jwt] JWT 사용하기 (0) | 2021.06.23 |
[react] redux 대신 SWR으로 Local 상태 활용하기 (0) | 2021.06.18 |
[spring cloud] eureka 설정 중 에러(Network level connection to peer localhost; retrying after delay) (0) | 2021.06.10 |
[spring, mssql, sqlserver] 접속에러 (TLS10) (2) | 2021.05.28 |
댓글