For anyone else encountering this after a failed install from a git repository, you can try:
gc --all