git安装错误缺少安装候选

标签 git ubuntu

我尝试安装 git在 Ubuntu 12.10 上使用命令 sudo apt-get install git .但我收到这样的错误消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'git' has no installation candidate

我应该进一步做什么?

最佳答案

尝试运行以下命令。

sudo rm -vf /var/lib/apt/lists/*
sudo apt-get update

关于git安装错误缺少安装候选,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63632820/

相关文章:

python - 为什么这个 Python 脚本不能在 Ubuntu 12.04 中作为启动应用程序运行?

python - 运行脚本以发送游戏内泰拉瑞亚服务器命令

ubuntu - 配置内核

ubuntu - 建筑琼斯福斯 - asm/unistd.h : No such file or directory

xcode - 全局 .gitIgnore 文件的内容是什么?

git - 创建新的 git 分支,仅包含某些文件的完整历史记录

git - 如何强制 Jenkins 重建分支?

php - 无法在 Ubuntu 20.04 上将 PHP 版本从 8.0 切换到 7.4

git - 每次提交时我都必须 'git add' 一个文件吗?

git push 显示 "Everything up-to-date"但比较显示差异