1.sudo gem install cocoapods:
ERROR:While executing gem ... (Errno:EPERM)
Operation not permitted - /usr/bin/pod
1.1 解决尝试一
1.1.1 步骤
自定义GEM_HOME
$ mkdir -p $HOME/Software/ruby
$ export GEM_HOME=$HOME/Software/ruby
$ gem install cocoapods
[...]
1 gem installed
$ export PATH=$PATH:$HOME/Sofware/ruby/bin
$ pod --version
0.37.2
1.1.2 结果
结果:显示成功 ,但是还是不行。
2.pod:command not found
发现没有安装成功,因为文件夹没有写权限。
3. 先删除再安装
sudo gem uninstall cocoapods -v 0.35.0
sudo gem install -n /usr/local/bin cocoapods