Run apt-get update before installing git-core.