pod install -bash: pod: command not found

后端 未结 21 2775
野的像风
野的像风 2020-11-28 19:06

I installed pod some time ago. However, it\'s stopped working so I\'m working through this again.

However, I almost immediately run into a problem here:

21条回答
  •  死守一世寂寞
    2020-11-28 19:47

    I had the same problem, running Mountain Lion with Ruby 2 installed and used instead of system ruby.

    Previously I added PATH=/usr/local/bin:$PATH to my ~/.bash_profile as a way to make sure stuff installed by homebrew, including Ruby 2, took precedence over system-installed binaries.

    Anyway, in this case I noticed that cocoapods would install their 'pod' binary not in /usr/local/bin but rather in /usr/local/Cellar/ruby/2.0.0-p247/bin/

    So to my .bash_profile I added PATH=$PATH:/usr/local/Cellar/ruby/2.0.0-p247/bin/ and now cocoapods is working like a charm.

提交回复
热议问题