gem install fails with openssl failure

后端 未结 11 1078
花落未央
花落未央 2020-12-07 07:51

I tried to install cocoapods (http://cocoapods.org/) on my OSX Mountain Lion.

 moshe-mbp:~ moshem$ gem install cocoapods
 ERROR:  Could not find a valid gem          


        
11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 08:40

    I had the same error. To fix just run the following commands (I know you've ran some but humor me):

    brew update
    brew install openssl
    brew link openssl --force
    brew install curl-ca-bundle
    

    After that, open a new shell or source your files and all should be good to go :)

    UPDATE:

    To update your paths you'll need to edit your /etc/paths file so do something like:

    sudo vim /etc/paths
    

    In there is should look something like:

    /usr/bin
    /bin
    /usr/sbin
    /sbin
    /usr/local/bin
    

    What you want to do is to ensure that /usr/local/bin is at the top of the file. So change it to something like:

    /usr/local/bin
    /usr/bin
    /bin
    /usr/sbin
    /sbin
    

    Hope that fixes it!

提交回复
热议问题