2017-05-13 11 views
0

問題:原因openSSLのにピップインストール投げ打ち鳴らすエラー

a)のエラーが(コメントで以下に解決しよう)

1 warning generated. 
    clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -arch x86_64 build/temp.macosx-10.12-x86_64-2.7/_mysql.o -L/usr/local/Cellar/mysql/5.7.18_1/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.12-x86_64-2.7/_mysql.so 
    ld: library not found for -lssl 
    clang: error: linker command failed with exit code 1 (use -v to see invocation) 
    error: command 'clang' failed with exit status 1 
のmysql-pythonのの ピップのインストールがエラー以下投げています

b)第二のエラー:(解決していない)

Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "/private/var/folders/vp/vyzq_s9172xbbhh6mzth7grw0000gn/T/pip-build-y6KQBa/MySQL-python/setup.py", line 17, in <module> 
    metadata, options = get_config() 
    File "setup_posix.py", line 53, in get_config 
    libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ] 
    File "setup_posix.py", line 8, in dequote 
    if s[0] in "\"'" and s[0] == s[-1]: 
IndexError: string index out of range 

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/vp/vyzq_s9172xbbhh6mzth7grw0000gn/T/pip-build-y6KQBa/MySQL-python/ What I am using I am using a MAC OS and I have installed mysql using homebrew. Then I created a virtual environment & ran pip install MySQL-python

構成は以下のとおりです。

HOMEBREW_VERSION: 1.2.0 (latest) 
PYTHON_VERSION: 2.7.13 (latest) 
PIP_VERSION: 9.0.1 (latest) 

私がこれまでに行っているもの:私が結ばれている 次救済策のように:brew doctor確認がエラー

  • 再インストールXコードのセットアップなしで作る

    1. ツール
    2. mysqlのアンインストールとインストール

    ターミナル:

    brew uninstall mysql 
    pip install MySQL-python 
    brew install mysql 
    
  • mysql-connector-c
  • と試みる(1.2.3、1.2.4 & 1.2.5)
  • をMySQLの、パイソンの異なるバージョンを試す
      下記のコメントで示唆されているように、Brew Linkのopensslを解決すると、最初のエラーが解決されます。しかし、私は 第二号を解決することができませんでした。
  • +1

    私は、MySQLについてほとんど知っているが、エラーは、どちらかが何のライブラリ 'のlibssl ...'がインストールされていない、またはリンカーを見つけることができないことを示唆しているようですそれ。あなたは 'brew install openssl'を先に使ってみましたか? (また、ちょうどヒント、私は関与しているソフトウェアの経験がありません) –

    +0

    私は自分のBrewインストールのopensslを調べて、brewがopensslと正しくリンクしていないことを確認しました。これを修正するために、私は 'brew info openssl'を実行し、bashprofile' echo 'export PATH = "/ usr/local/opt/openssl/bin:$ PATH"' '' '〜/ .bash_profile'へのパスをエコーし​​ました。それから私は 'brew link - force opensl 'をしました。これは以前のエラーを解決しましたが、新しいエラーを出しています。 – rahulthakur319

    +0

    私は同じことを反映するために質問を更新しました – rahulthakur319

    答えて

    0

    最後に、私はあなたのXcodeやXcodeのツールがインストールされていないためです&再インストールX-コード

    0

    をアンインストールすることでこの問題を解決しました。あなたはXcodeのを持っていたら、あなたとXcodeのツールをインストールすることができます

    xcode-select --install 
    
    関連する問題