按照往常的方法一样安装Cocoapods,在安装的过程中遇到了一切问题,按照传统的命令sudo gem install cocoapods出现了如下的错误:
ERROR:Whileexecuting gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod。
安装:
sudo geminstall-n/usr/local/bincocoapods -v1.0.1
卸载
sudo gemuninstall-n/usr/local/bincocoapods -v1.0.1
在终端输入pod setup,会出现Setting up CocoaPods master repo,等几分钟,会输入Setup completed,说明pod setup执行成功。
终端输入rm ~/Library/Caches/CocoaPods/search_index.json
执行pod search