Git clone error after OS X Mountain Lion update - github

I just updated my MBP to OSX 10.8 and am trying to start a new project with brunch.io which by default uses coffeescript and I prefer javascript so I need to clone the simple js skeleton. So something like this:
brunch new <someprojectname> --skeleton https://github.com/brunch/simple-js-skeleton.git
Which is what I have used previously and it worked fine. But today I am getting the following error:
error: Git clone error: /bin/sh: git: command not found
I really don't know how to fix this...

You can download Apple's official collection of developer command line utilities (which includes git) by either:
Opening Xcode, going to Preferences > Downloads and clicking the install button next to 'Command Line Utilities'
Going to developer.apple.com/downloads, and downloading "Xcode 4.4 Command Line Tools for OSX 10.8" from the Xcode 4.4 category

Check your .bashrc or .bash_profile if the appropiate PATH is set. Did you install git via macports? The update probably dropped the /opt/bin or /opt/local/bin from the PATH.

I got everything working again. Apparently the update to Mountain Lion dropped git altogether. Simply downloading the install package from here and running it has everything working again.

YOu have to change your security settings go to System Preferences > Security and Privacy > Change Allow Applications downloaded from --> Anywhere. There is a chance your security settings would be locked in that case press the lock at the bottom left on the pref pane.

Based on this article:
open your ~/.bash_profile, if you use nano it would be :
$ sudo nano ~/.bash_profile
add this line to the file:
export PATH=$PATH:/usr/local/git/bin/
Save & close the file and type on the terminal:
$ source ~/.bash_profile

Related

Terminal: Swift Build command does not work

When I am using Swift Package builder in the OSX terminal, it does now work.
swift build
I get:
:0: error: no such file or directory: 'build'
REPL works and all the snapshots seem to be installed. Does anyone know the issue?
Yes. It helps. By Default command line tool will have nothing selected. Once you click a drop down will come and you can select the latest xCode. This will associate the XCode tool chain to the command line and you can use swift build, swift package init etc. You may not have to set the path also.
The solution is to download the development snapshot, not the release one - https://swift.org/builds/development/xcode/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a-osx.pkg
/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin should be appended before $PATH in your .bashrc:
PATH=/Applications/IBM/node/bin:/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:$PATH
A simpler solution is to install latest Xcode and change the command line tools to point to latest XCode Version. It can be done by going to Xcode > preferences > Locations > Command line tools.
Change it to Xcode (version number).

App can't be opened because it is from an unidentified developer

I installed Mac OS X Mavericks (10.9) yesterday and since then I am not able to start my Eclipse. I am attaching a screenshot of the message I see.
Is there a workaround for this?
I found a solution in Fix the “App can’t be opened because it is from an unidentified developer” Error in Mac OS X.
It's because of the Security options.
Go to System Preferences... > Security & Privacy and there should be a button saying Open Anyway, under the General tab.
You can avoid doing this by changing the options under Allow apps downloaded from:, however I would recommend keeping it at the default Mac App Store and identified developers.
An easier way to open a document from an unidentified developer, if you know it's safe, is to control-click on the file icon and then select "Open." You will then be given the option of opening it regardless of its unidentified source.
Right-click (or control-click) the application in question and choose "Open"
In terminal type the command:
xattr -d com.apple.quarantine [file path here]
Once you click enter it will no longer have that problem. Its annoying that apple adds a quarantine to files automatically. I do not know how to turn this off but there probably is a way...
You can also use the xattr command as in Stack Overflow question How do I remove the "extended attributes" on a file in Mac OS X?.
Just remove the com.apple.quarantine attribute. It works even if you don't have an administrator account, which can be a plus. After that, the app isn't considered "downloaded" and is therefore not blocked.
It is prohibiting the opening of Eclipse app because it was not registered with Apple by an identified developer. This is a security feature, however, you can override the security setting and open the app by doing the following:
Locate the Eclipse.app (eclipse/Eclipse.app) in Finder. (Make sure you use Finder so that you can perform the subsequent steps.)
Press the Control key and then click the Eclipse.app icon.
Choose Open from the shortcut menu.
Click the Open button when the alert window appears.
The last step will add an exception for Eclipse to your security settings and now you will be able to open it without any warnings.
Note, these steps work for other *.app apps that may encounter the same issue.
you can modify the gatekeeper settings by running the following command
To disable to allow apps from anywhere to be installed use the following command in terminal ::
sudo spctl --master-disable
To re-enable use the following command
sudo spctl --master-enable
I had the same problem, Eclipse would not start. Found this link and it worked like a charm:
Can't click Menu Bar Items in Eclipse
Java is messed-up on Maverick, need to download and install from here:
http://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US
Control Click the application in the Applications folder, not lauchpad. Choose open and then you get an options to actually open it.
Right click > Open.
Or, you can go into System Preferences, Security & Privacy, and set the restrictions on opening apps there.
I had got the same error.
Because of security reasons, I could not see option for allowing Apps downloaded from Anywhere in System preference-> Security Tab.
I removed the extended attribute from Zip file by below command.
xattr -d com.apple.quarantine [Zip file path]
And then got below error:-
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
Resolved it by uninstalling all different versions of java and installed just 1.8.0_231.
Worked finally.
In your terminal, simply run
sudo spctl --master-disable
in order to allow apps be downloaded from any developer
Open terminal, go to extracted folder of eclipse and run the following command:
./eclipse -clean
Terminal type:
Last login: Thu Dec 20 08:28:43 on console
~  sudo spctl --master-disable
Password:
~  spctl --status
assessments disabled
~ 
System Preferences->Security & Privacy
Open Terminal, Go to the eclipse folder, Run ./eclipse
Try looking into Gatekeeper. I am not sure of too much Mac stuff, but I heard that you can enable it in there.

Step by step instructions for getting cppunit up and running with Netbeans 7.2 on OS X 10.8 Mountain Lion

Can someone please provide step by step instructions for getting cppunit working on OS X 10.8 Mountain Lion? This includes any downloads needed and any configuration of Netbeans.
Currently, when I add a cppunit test, there is a warning on the Add Test dialog that says "cppunit library is not detected. Test compilation might fail." I've download both from Sourceforge and from svn cppunit and copied the files to /usr/local/include, but this does not make compilation errors go away.
What am I missing? The Google™ has been of no help with this issue.
I used Homebrew to install CppUnit on OS X 10.8 Mountain Lion. Unit tests then worked from within Netbeans without issue.
The process I followed was:
Install the XCode Command Line Tools
Available in XCode preferences or Download as separate DMG
Install Homebrew
See Link
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
Following install instructions (brew doctor at the end for example)
Use brew to install cppunit
brew install cppunit
In Netbeans:
Create C++ project
Add a function to test
Right click cpp file, select "Create Test", choose CppUnit Test
Select function from list, follow prompts to create test
Execute tests
Right click project, select Test (or crtl+F6)
I finally figured out what I was doing wrong, so I thought I would answer my own question and avoid a Wisdom of the Ancients.
install Xcode.
install Xcode Command Line Tools via the Preferences dialog (Apple's documentation showing how to do this in Xcode 4)
download CPPUnit from Sourceforge
extract
Run ./configure
run make
run sudo make install
It's possible that the first time I tried this I didn't run the correct command for ./configurebut that's a dubious claim given the fact that I was able to tab complete i.e. I shouldn't have been able to run say ./config.
But I think the real key to my problem was having to call sudo on the make install. I was getting a permission error because the script needs admin rights to put the libraries where they need to go. I could have swore I tried this at some point and it too failed.
I had a coworker try this for me a month or so ago and he got it to work. I procrastinated retrying, but once I did, it worked like a charm. As far as I know, there's no bug between OS X 10.8.1 and 10.8.2 or .3.
Once I followed the steps I have listed above, I was able to go back to Netbeans and add a unit test without the dialog complaining. Furthermore, the test code compiled and ran.

pip install fails with /usr/bin/clang: No such file or directory

I am migrating my dev environment to 10.8, however I am having issues with pip.
Specifically, I'm using a virtualenvs/virtualwrapper but cannot pip install psycopg2, and during the building of the psycopg2._psycopg extension, I get:
unable to execute /usr/bin/clang: No such file or directory
error: command '/usr/bin/clang' failed with exit status 1
Can anyone offer a solution to this?
This probably happens because you did not re-install the Command Line Tools after upgrading.
Usually XCode should be upgraded to the latest version (4.4) (I believe when I updated to 10.8 I also updated a whole bunch of other applications, including XCode). After the update you need to re-install the Command Line Tools. This can now be done via a setting in XCode:
Go to "Preferences -> Downloads" and install "Command Line Tools".
Now you should have no more problems when installing packages that need to be compiled.

Cocos2d install

I tried to install cocos2d framework to my xcode but I can't. I have Xcode version 3.2.5, cocos2d framework version 0.99.5, and iOS version 4.2.
I opened the terminal and entered
$ sudo /mac2/cocos2d-iphone-0.99.3/install-templates.sh
Terminal asks me for my password and I enter it. Everything seems going well; the terminal displayed "done". When I open Xcode, I do not see any cocos2d project in user templates (I do not see user template section in the new project list).What is the problem?
sudo ./install-templates.sh
means to install for system wide. The template would appear in the system wide section.
For as user template, use -u option.
./install-templates.sh -u
This is a duplicate of :
How to install Cocos2d PROJECT templates in Xcode 4?
The solution is that you have to get the latest from github in order to get xcode 4 templates.
The solution link is here:
http://www.cocos2d-iphone.org/forum/topic/13782/page/2#post-82267
The github link is:
https://github.com/cocos2d/cocos2d-iphone.git
I just verified this works.
I only use ./install-templates.sh -u -f and it works for me.
Do this:
In finder, go to your hard drive,
Go to Developer => Library and drag the cocos2d folder into this folder,
Next, open terminal, type cd , and drag the cocos2d folder into the terminal window.
Now do sudo ./install-templates.
That should work.
After, restart xcode.
Hope that helps.
sudo ./install-templates.sh -u -f
Don't forget the -f