首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何重新安装APT工具?

如何重新安装APT工具?
EN

Ask Ubuntu用户
提问于 2019-02-28 20:28:11
回答 1查看 6.9K关注 0票数 4

我想重新安装APT工具,所以我卸载了它,然后我意识到如果我只删除/etc/apt目录,它可能会更好。我有什么办法能解决我的问题吗?

我的Ubuntu版本是18.04.2LTS,ls /etc/apt的输出是

代码语言:javascript
复制
root@user-OptiPlex-755:~# ls /etc/apt 
ls: cannot access '/etc/apt': No such file or directory

更新:我已经重新安装了apt,但是,这是我的输出:

代码语言:javascript
复制
root@user-OptiPlex-755:~# sudo apt install --reinstall apt-utils ubuntu-minimal ubuntu-release-upgrader-gtk ubuntu-desktop update-manager update-notifier update-notifier-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package update-manager 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
However the following packages replace it:
ubuntu-release-upgrader-core update-manager-core

Package update-notifier-common 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

Package update-notifier 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
However the following packages replace it:
update-notifier-common

Package apt-utils 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
However the following packages replace it:
apt

Package ubuntu-release-upgrader-gtk 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 'apt-utils' has no installation candidate
E: Unable to locate package ubuntu-minimal
E: Package 'ubuntu-release-upgrader-gtk' has no installation candidate
E: Unable to locate package ubuntu-desktop
E: Package 'update-manager' has no installation candidate
E: Package 'update-notifier' has no installation candidate
E: Package 'update-notifier-common' has no installation candidate`
EN

回答 1

Ask Ubuntu用户

发布于 2019-02-28 22:02:47

更新:我有一个Ubuntu服务器就在我旁边,所以我将它的/etc/apt与这个Ubuntu合并,问题就解决了。谢谢您的帮助,我确信我的第二个问题的核心是我错过了/etc/apt/sources.list文件。一旦我复制了这些文件,我就能够安装已删除的软件包。再次感谢你的帮助!

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1122065

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档