error: command 'gcc' failed with exit status 1

Choi Rim·2021년 11월 8일
0

Error

목록 보기
3/4
pip install mysqlclient
    ERROR: Command errored out with exit status 1:
     command: /Users/Mac/miniconda3/envs/task2/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x8/l_z25ggj4mb_g3kh5n5s4h_w0000gn/T/pip-install-kz5zu6p_/mysqlclient_6fe413819d84497582486abd0aa63e16/setup.py'"'"'; __file__='"'"'/private/var/folders/x8/l_z25ggj4mb_g3kh5n5s4h_w0000gn/T/pip-install-kz5zu6p_/mysqlclient_6fe413819d84497582486abd0aa63e16/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x8/l_z25ggj4mb_g3kh5n5s4h_w0000gn/T/pip-record-s0xep4q3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/Mac/miniconda3/envs/task2/include/python3.8/mysqlclient
         cwd: /private/var/folders/x8/l_z25ggj4mb_g3kh5n5s4h_w0000gn/T/pip-install-kz5zu6p_/mysqlclient_6fe413819d84497582486abd0aa63e16/
    Complete output (43 lines):
    mysql_config --version
    ['8.0.27']
    mysql_config --libs
    ['-L/usr/local/opt/mysql-client/lib', '-lmysqlclient', '-lz', '-lzstd', '-lssl', '-lcrypto', '-lresolv']
    mysql_config --cflags
    ['-I/usr/local/opt/mysql-client/include/mysql']
    ext_options:
      library_dirs: ['/usr/local/opt/mysql-client/lib']
      libraries: ['mysqlclient', 'zstd', 'resolv']
      extra_compile_args: ['-std=c99']
      extra_link_args: []
      include_dirs: ['/usr/local/opt/mysql-client/include/mysql']
      extra_objects: []
      define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb
    creating build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants
    running build_ext
    building 'MySQLdb._mysql' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/MySQLdb
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/Mac/miniconda3/envs/task2/include -arch x86_64 -I/Users/Mac/miniconda3/envs/task2/include -arch x86_64 -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/usr/local/opt/mysql-client/include/mysql -I/Users/Mac/miniconda3/envs/task2/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.8/MySQLdb/_mysql.o -std=c99
    gcc -bundle -undefined dynamic_lookup -L/Users/Mac/miniconda3/envs/task2/lib -arch x86_64 -L/Users/Mac/miniconda3/envs/task2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.9-x86_64-3.8/MySQLdb/_mysql.o -L/usr/local/opt/mysql-client/lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-10.9-x86_64-3.8/MySQLdb/_mysql.cpython-38-darwin.so
    ld: library not found for -lzstd
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'gcc' failed with exit status 1

mysqlclient를 설치하려고 하는데 이런 에러가 발생했다.

conda install -c conda-forge fbprophet

위 명령어로 해결해주었다.

pip install mysqlclient

다시 install 해주면 정상적으로 잘 설치된다.

Successfully installed mysqlclient-2.0.3

profile
https://rimi0108.github.io/

0개의 댓글