복붙노트

[PYTHON] cc1 : 오류 : Mac에서 python-mysql을 설치하는 동안 인식 할 수없는 명령 줄 옵션 "-Win-null-conversion"10.7.5

PYTHON

cc1 : 오류 : Mac에서 python-mysql을 설치하는 동안 인식 할 수없는 명령 줄 옵션 "-Win-null-conversion"10.7.5

이 오류는 Mac 10.7.5에서 python-mysql 설치를 위반했습니다. 다음은 단계입니다.

다음은 빌드를위한 스택 추적입니다.

running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.7-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.7-intel-2.7/_mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64
cc1: error: unrecognized command line option "-Wno-null-conversion"
error: command 'llvm-gcc-4.2' failed with exit status 1

당신의 제안과 아이디어를 환영하십시오. 감사.

해결법

  1. ==============================

    1.cflags를 제거해보십시오. -Wno-null-conversion -Wno-unused-private-field in

    cflags를 제거해보십시오. -Wno-null-conversion -Wno-unused-private-field in

    /usr/local/mysql/bin/mysql_config.
    

    처럼:

    cflags="-I$pkgincludedir  -Wall   -Os -g -fno-strict-aliasing -DDBUG_OFF -arch x86_64 " #note: end space!
    
  2. ==============================

    2.와우, 나는 'pip-python을 설치하십시오.'라고 thistrying하는 데 두 시간을 보내고 있습니다. Xcode 4.6.3, Xcode 명령 줄 도구 (Mac OS X 10.7.5)를 다시 설치하고 Kenneth Reitz의 자료 (https://github.com/kennethreitz/osx-gcc-installer)를 설치했습니다. 내가있는 동안 아무 소용이 없어 ...

    와우, 나는 'pip-python을 설치하십시오.'라고 thistrying하는 데 두 시간을 보내고 있습니다. Xcode 4.6.3, Xcode 명령 줄 도구 (Mac OS X 10.7.5)를 다시 설치하고 Kenneth Reitz의 자료 (https://github.com/kennethreitz/osx-gcc-installer)를 설치했습니다. 내가있는 동안 아무 소용이 없어 ...

    cflags 옵션을 변경하면 결국 도움이되었습니다!

    감사!

  3. from https://stackoverflow.com/questions/16127493/cc1-error-unrecognized-command-line-option-wno-null-conversion-within-insta by cc-by-sa and MIT license