Some problems with installing Cocoapods under Mac OS10.10

Source: Internet
Author: User

Today, a friend asked me a question: Why I installed cocoapods unsuccessful, reported

Sh:line 1:997 Abort trap:6/applications/xcode.app/contents/developer/usr/bin/xcodebuild-sdk/-find git 2>/dev/nu ll
Git:error:unable to find utility ' git ', not ' a developer tool or in PATH

To report such errors. At that time, I asked him if he was installing the installation steps of the official website. He said yes.

At that time, I was very puzzled, because I installed the time is so step by step, no problem ah. Then I saw this error "unable to find utility" Git ", not a developer tool or in PATH",

The GIT path could not be found. Then, in order to verify that he entered "git" in the terminal, the result is true. And then "which git" = = =

/usr/bin/git

This time indicates that the system has git. Then why not path. (originally in order to understand PHP, on the machine also configured similar things, but also do not understand the inside of things, to tell the truth command this thing a little let me not adapt). So how is this problem solved:

1. Vim ~/.bash_profile

2. Under the file I input export path= "/usr/local/git/bin: $PATH", Save: Wq

3. Update the source ~/.bash_profile

4. Git

======================= over

But during this time, I was offered other solutions with the. bashrc file. What is the difference between these two documents, or what is the earth?

Mac generally uses bash as the default Shell,mac the default environment variables are loaded in the order:

/etc/profile/etc/paths ~/.bash_profile ~/.bash_login ~/.profile ~/.BASHRC

Where/etc/profile and/etc/paths are system-level

So there are more than 2 solutions to this problem.

This is an example of modifying the cocoapods specs Image:

Pod Repo Remove Master
Pod Repo Add Master Https://gitcafe.com/lloydsheng/Specs.git
Pod Repo update

But what does his terminal not directly git, and what can I do? I don't have a problem with this question, which is said to be the 10.10 system.

==================other knowledge

Learn another thing between here, don't understand these things before, and share another knowledge of Mac: the Ultimate shell

Some problems with installing Cocoapods under Mac OS10.10

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.