美文网首页
[转]MAC OS升级到10.11(OS X EICAPTION

[转]MAC OS升级到10.11(OS X EICAPTION

作者: 你飞跃俊杰 | 来源:发表于2018-06-07 10:27 被阅读11次

    升级系统到10.11,下载了一整个晚上之后终于在早上下载完毕,早上带到公司,想查一个第三方库的时候却遇到了问题:

    guoyufudeMacBook-Pro:~ GuoYufu$ pod search VKVideoPlayer

    -bash: pod: command not found

    接着尝试:

    guoyufudeMacBook-Pro:~ GuoYufu$ gem sources -l

    *** CURRENT SOURCES ***

    http://ruby.taobao.org/

    这里没错。

    guoyufudeMacBook-Pro:~ GuoYufu$ pod help

    -bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory

    然后基本确定是系统升级之后导致CocoaPods不能正常使用。继续查找解决方案:

    1.首先考虑重新安装CocoaPods:

    guoyufudeMacBook-Pro:~ GuoYufu$ sudo gem install cocoapods

    Password:

    ERROR:  While executing gem ... (Errno::EPERM)

        Operation not permitted - /usr/bin/pod

    失败。

    2.继续根据报错信息查找解决方法,运行查到的:

    1sudo gem install -n /usr/local/bin cocoapods

    提示:

    1

    2

    3

    Successfully installed cocoapods-0.38.2

    Parsing documentation for cocoapods-0.38.2

    1 gem installed

    莫非成功了?

    尝试:

    1pod search VKVideoPlayer

    可以正常执行。

    尝试更新一下CocoaPods的版本:

    guoyufudeMacBook-Pro:~ GuoYufu$ sudo gem install cocoapods

    Password:

    ERROR:  While executing gem ... (Errno::EPERM)

        Operation not permitted - /usr/bin/pod

    还是报错。

    3.索性按照最初安装的步骤全部来一遍:

    安装Homebrew

    1ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    安装Ruby后重新安装CocoaPods

    1brew install ruby

    1sudo gem install cocoapods

    终于不再报错了。

    相关文章

      网友评论

          本文标题:[转]MAC OS升级到10.11(OS X EICAPTION

          本文链接:https://www.haomeiwen.com/subject/eewwsftx.html