LoginSignup
noro8128
@noro8128

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

pyenvをinstallできないのですが、解決策を教えてください。

pyenvがインストールできない

macOSでbrewを使ってpythonをインストールしようとするとエラーが出てインストールする事が出来ません。解決策を教えてください。

発生している問題・エラー

$ brew install pyenv
==> Installing dependencies for pyenv: autoconf, pkg-config
==> Installing pyenv dependency: autoconf
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/autoconf-2.
Error: /usr/bin/curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
Error: /usr/bin/curl is not executable
0

2Answer

This answer has been deleted for violation of our Terms of Service.

which curlを打つと/usr/bin/curlと表示されますか。表示される場合はcurlを再インストールしてみてください。

0

Comments

  1. @noro8128

    Questioner
    $ which cur と打っても何も表示されませんでした
  2. which curlと実行しましたか。タイプミスしませんでしたか。
    また、brewを実行したディレクトリにcurlという同名のファイルが存在しないか確認してください。
  3. @noro8128

    Questioner
    タイプミスなしで打っても何も表示されませんでした。

    $ ls -l /usr/bin/curl と打ったところ
    lrwxr-xr-x 1 root wheel 19 8 16 2018 /usr/bin/curl -> /usr/local/bin/curl
    上記の様に表記されました。
  4. echo $PATH
    とうつと何が表示されますか
  5. @noro8128

    Questioner
    返信が遅くなってすみません...

    $ echo $PATH と打つと
    /Users/racco/.pyenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

    と表示されます
  6. パスは問題なく通っているようですね。curlを再インストールしてみてください。
  7. @noro8128

    Questioner
    curlのインストールを試してみたところ下記のエラーが出たのですが、curlと名前のついたファイル?を先に消去する必要があるのでしょうか?

    $ brew install curl
    ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/curl-7.38.0
    Error: /usr/bin/curl is not executable
    Warning: Bottle installation failed: building from source.
    ==> Installing curl dependency: pkg-config
    ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-
    Error: /usr/bin/curl is not executable
    Warning: Bottle installation failed: building from source.
    ==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
    Error: /usr/bin/curl is not executable
  8. インストール前にアンインストールしましたか?
  9. @noro8128

    Questioner
    インストールを実行するより先にアンインストールを実行していたのですが

    $ brew uninstall curl
    Error: No such keg: /usr/local/Cellar/curl

    と表示されたので既にcurlが無いと思ったのですが、削除したいcurlをうまく指定できていないのでしょうか?
  10. brew uninstall --force curl
    brew cleanup -s curl
    brew cleanup --prune-prefix
    brew install curl
    を試してみてください。
  11. @noro8128

    Questioner
    試してみたところ

    $ brew uninstall --force curl
    何も表記されない

    $ brew cleanup -s curl
    Error: No such file or directory - /usr/local/Cellar/curl

    $ brew cleanup --prune-prefix
    何も表記されない

    brew install curl
    ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/curl-7.38.0
    Error: /usr/bin/curl is not executable
    Warning: Bottle installation failed: building from source.
    ==> Installing curl dependency: pkg-config
    ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-
    Error: /usr/bin/curl is not executable
    Warning: Bottle installation failed: building from source.
    ==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
    Error: /usr/bin/curl is not executable

    という結果になりました...
  12. sudo brew uninstall curl
    はどうですか?sudoをつけただけですが。
  13. @noro8128

    Questioner
    同じ結果が表示されます...

    $ sudo brew uninstall curl
    Password:(きちんと入力しました)
    Error: No such keg: /usr/local/Cellar/curl
  14. brew update
    brew upgrade
    の後に
    brew install pyenv
    ではどうでしょう?
  15. @noro8128

    Questioner
    brew updateはエラーが出ました...
    サイトにアクセスできてないのでしょうか?

    $ brew update
    fatal: unable to access 'https://github.com/Homebrew/homebrew/': Failed connect to github.com:443; Connection refused
    Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

    $ brew upgrade は何も表示されず

    インストールも変わらずエラーが表示されてます
    $ brew install pyenv
    ==> Installing dependencies for pyenv: autoconf, pkg-config
    ==> Installing pyenv dependency: autoconf
    ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/autoconf-2.
    Error: /usr/bin/curl is not executable
    Warning: Bottle installation failed: building from source.
    ==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
    Error: /usr/bin/curl is not executable
  16. homebrew自体がおかしいのでは?あるいはインターネット接続がないとか?
  17. @noro8128

    Questioner
    インターネット接続は問題ないみたいです。

    homebrewのバージョンを調べたら
    $ brew -v
    Homebrew 0.9.5

    と表示されました。
    Pythonも随分と古いものが入っているので、brewも何年か前のものである可能性があります...

    Homebrewのバージョンが古すぎるが故に、対応できない可能性はあるのでしょうか?
  18. @noro8128

    Questioner
    送って頂いたURLの手順通りにやってみたのですが

    $ git config --unset http.proxy は下記のエラーが出ました。
    error: could not lock config file .git/config: No such file or directory

    こちらは何も表示されず
    $ git config --globa --unset https.proxy

    別のサイトで書かれていた手法を試してみましたが

    $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
    -bash: curl: command not found
    こちらもエラーが出ました。

    Rubyのバージョンも古いようですし,
    $ ruby -v
    ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]

    Python自体もかなり古いので
    Python 2.7.5 (default, Mar 9 2014, 22:15:05)

    この辺も関係して二進も三進も行かなくなってるのかもしれません。
    ここまで数日に渡って相談にのって頂いたのですが、教授と相談して異なるOSを使うかパソコン自体を変えようと思います...

    何日も相談にのって頂きありがとうございました。
  19. 相当古いですね汗。OSを再インストールするとか、homebrewを再インストールするとか、パソコン自体を変えるかあたりですね。お疲れ様でした^^

Your answer might help someone💌