1

Hello Everyone I'm having trouble using git clone. It has been working until lately when I tried to clone a larger repository I am getting the error message

Fatal: out of memory Malloc Failed
Fatal: index-pack failed 

I have been searching all day for an answer so any help would be appreciated

(I am using Kali Linux 1.0.9 ARM on my Raspberry Pi model B+ if that is any help)

1 Answer 1

1

Since real RAM memory is rare on a raspberry pi, you could only increase your swap memory in order to increase the available virtual memory. However, accessing swap memory is much slower than real memory, meaning the process will take a long time to finish - but it should at least finish without an error.

Follow these steps to create and activate additional swap memory (1GB):

dd if=/dev/zero of=swapfile bs=1024 count=$((1024*1000))
mkswap swapfile
swapon swapfile

Run the above commands as root.

Now try to run git clone again.

Sign up to request clarification or add additional context in comments.

5 Comments

This did not work for me, albeit on a Virtual Machine and not an rpi.
I was able to turn on swap, but it did not solve the problem.
You mean your git clone command needs more than 1.25G memory?
Apparently so. I added 2GiB swap partition, and even though the malloc call was 1.6G, 2G wasn't enough.
bs=1024 might not be enough. I used 2048... 2048*1000 with success after first trying just adding 1GB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.