linux - 无法安装git

标签 linux git github git-svn

我在 linux mint 12 lisa 上运行了以下命令:

1). sudo rm -rf /var/lib/apt/lists/* -vf
2). sudo apt-get update
3). sudo apt-get install git

我在运行 3. 即安装 git 时出现以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package git

我的/etc/apt/sources.list 文件包含以下内容:

deb http://packages.linuxmint.com/ lisa main upstream import
deb http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ oneiric-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ oneiric-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ oneiric partner
deb http://packages.medibuntu.org/ oneiric free non-free

# deb http://archive.getdeb.net/ubuntu oneiric-getdeb apps
# deb http://archive.getdeb.net/ubuntu oneiric-getdeb games

sudo apt-get upgrade 显示如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

最佳答案

您需要先安装 aptitude。

sudo apt-get install aptitude

然后使用命令安装git

sudo aptitude install git

关于linux - 无法安装git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17973074/

相关文章:

android - 平板电脑上的 Postgresql 服务器?

git - 如何再次在Github上fork一个项目?

c - 如何使用 fnmatch

linux - Fortran:如何获取集群的节点名称

linux - 无法在 ec2 ubuntu 实例错误 : Some packages could not be installed 上安装 puppetserver

git - 如何在 git 中 merge 单个文件?

authentication - 我如何在 Netbeans 12.0 中使用 Github token ?

linux - 当您从机器 C ssh 进入 ssh 隧道 B->A 时,私钥会发生什么变化?

macos - Git 推送用户名错误的文件到github

git - 你能备份 git reflog 吗?关于防止代码丢失的最佳实践的建议