gpt4 book ai didi

linux - 撤消 apt-get 删除打开* ubuntu 12.04

转载 作者:太空宇宙 更新时间:2023-11-04 04:01:26 25 4
gpt4 key购买 nike

我在 ec2 上运行 Linux 实例,图像的快照排序已禁用。

尝试从系统中卸载 open-jdk 时。我愚蠢地运行了命令

sudo apt-get 删除打开*

它开始删除许多软件包,因此我通过 CTRL + c 停止了该过程。

我做了两次:

  • sudo apt-get 删除打开*
  • sudo apt-get 删除 openjdk*

我在两者之间停止了进程(CTRL + c)。

现在我发现我的其他应用程序无法运行,因为软件包已被删除。

请指教,如何才能回到apt-get删除之前的状态。

提前致谢。

最佳答案

在使用日志文件时,您也可以“手动”撤消,在花费数小时之前,有一个操作值得尝试:apt-get -f install
编辑:来自 debian 的手册页:

  -f, --fix-broken
Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages to permit APT to deduce a
likely solution. If packages are specified, these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT
itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual
intervention (which usually means using dselect(1) or dpkg --remove to eliminate some of the offending packages). Use of this option together with -m may produce an
error in some situations. Configuration Item: APT::Get::Fix-Broken.

关于linux - 撤消 apt-get 删除打开* ubuntu 12.04,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22812165/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com