I had to reinstall OS X Lion on my Macbook Pro, and upon trying to use git I got an error stating Segmentation fault: 11
. No matter what git command I try I get that error. I'm just doing this through the Mac terminal. No fancy programs or anything external.
I uninstalled git and just to make sure it was uninstalled I typed git init
and it gave me a command not found message.
I reinstalled git and I'm still getting the segmentation fault message. I get the message regardless of what directory I'm in and what command I use.
1) Segmentation Fault (also known as SIGSEGV and is usually signal 11) occur when the program tries to write/read outside the memory allocated for it or when writing memory which can only be read.In other words when the program tries to access the memory to which it doesn't have access to.
Core Dump/Segmentation fault is a specific kind of error caused by accessing memory that “does not belong to you.” When a piece of code tries to do read and write operation in a read only location in memory or freed block of memory, it is known as core dump. It is an error indicating memory corruption.
A segmentation fault means your program tried to access something it was not supposed to. That's part of the problem. There are many reasons why a program can access things its not supposed to, but compiled code pretty much just says “#$#@^*&!” instead.
I got it to work by uninstalling it again and installing 1.8.1 instead of 1.9.2. I guess OS X Lion doesn't like the latest release.
Try setting an email address in your git config if you haven't done so already - traced errors and that's what fixed it for me.
git config --global user.email "[email protected]"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With