描述
The IDE is giving an error message that it "can't start git: /usr/bin/git", however the path is correct, and it was working before. idea.log contains the following error: ''Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo''
解决
OSX Mavericks and Git Error
Posted November 1, 2013
by Page Wood & filed under Web Development.
The software project that I have been working on for the past few months is being built inLaravel 4. With the new edition of Laravel 4, bundles are now being built as packages which are pulled into the project via Composer. What’s that mean? It’s like building chunks of the software into plugins that can be re-used for other projects… Nifty.
I do all of my local dev work using MAMP on Mac OSX, and we use GitHub for version control. Periodically, I have to crack open Terminal and update composer to pull in the latest versions of our Laravel Packages. Being that I’m the Front-End guy on the team, I don’t use Windows like the rest of the crew… So when something goes wrong with Git and OSX, I’m typically left to my own devices and some Google Searches.
The other day I updated my Mac to the new OSX Mavericks, which is an awesome free upgrade (thanks Apple)! Unfortunately, this upgrade did cause a few odd things to happen with my mac. First, I had to re-install Java to open any of my Creative Suite Applications. Next, my Composer updates suddenly stopped working.
When I went to update the Vendor folder with all of the packages in the local Dev environment, I ran into an issue. I ran the usual, php composer.phar install
command after dumping the vendor folder and composer.lock folder, only to face a big red error. Man, those red errors are scary, especially for someone who just started learning to use command line a couple of months ago.
compliments of this thread. No luck.
I looked at the error a bit more…
“Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.”
– What?
Ah! Ok, X-code was obviously re-installed with OSX Mavericks. So the answer to this issue is simple. I simply had to run:
sudo xcodebuild -license
****This allowed me to view the X-code licence, and then agree to the terms.** Voila, that’s it. Everything worked just fine after that.
I’ve since sent this quick fix to my dev friends using GitHub and the Mac. Hope this helps someone else out there!