我不小心删除了 GnuPG 并破坏了我的系统!谁能帮我挽回我所造成的伤害吗?
为什么:
由于我有 GnuPG2 并且一直不小心使用 gpg 而不是 gpg2,我认为最好删除 gpg 并创建一个别名,所以我正在运行最新版本。
如何:
sudo apt-get remove gnupg
结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required: caja-folder-color-switcher dconf-cli eom gir1.2-mate-menu gir1.2-mate-panel libgtkmm-3.0-1 libmate-sensors-applet-plugin0 libmate-slab0 libmate-window-settings1 libmatedict6 libwireshark3 libwiretap3 libwsutil3 mate-applets mate-applets-common mate-common mate-control-center mate-control-center-common mate-indicator-applet mate-indicator-applet-common mate-media mate-media-common mate-netspeed
mate-netspeed-common mate-power-manager mate-power-manager-common mate-screensaver mate-screensaver-common mate-sensors-applet mate-sensors-applet-common mate-system-monitor mate-system-monitor-common mate-user-guide mate-utils mate-utils-common mint-artwork-gnome mint-artwork-mate mint-backgrounds-rosa mintdesktop mintmenu mintwelcome
mozo pluma python-mate-menu ubuntu-system-adjustments
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
add-apt-key apt gnupg libcryptui0a linuxmint-keyring mint-meta-core
mint-meta-mate seahorse-daemon seahorse-nautilus ubuntu-extras-keyring
ubuntu-minimal unattended-upgrades
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt gnupg (due to apt)
0 upgraded, 0 newly installed, 12 to remove and 4 not upgraded.
After this operation, 13.1 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?] Yes, do as I say!
(Reading database ... 255894 files and directories currently installed.)
Removing mint-meta-mate (2015.12.21) ...
Removing mint-meta-core (2015.12.21) ...
Removing add-apt-key (1.0-0.5) ...
Removing unattended-upgrades (0.82.1ubuntu2.5) ...
Removing ubuntu-minimal (1.325) ...
Removing seahorse-nautilus (3.8.0-0ubuntu2) ...
Removing libcryptui0a:amd64 (3.8.0-1) ...
Removing seahorse-daemon (3.8.0-1) ...
Removing ubuntu-extras-keyring (2010.09.27) ...
OK
Removing linuxmint-keyring (2009.04.29) ...
OK
Removing apt (1.0.1ubuntu2.17) ...
Removing gnupg (1.4.16-1ubuntu2.4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for libglib2.0-0:i386 (2.40.2-0ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.40.2-0ubuntu1) ...
Processing triggers for gconf2 (3.2.6-0ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...
Processing triggers for install-info (5.2.0.dfsg.1-2) ...
现在我的处境很糟糕,我的新世界是这样的:
sudo apt-get 安装 apt
当前未安装程序“apt-get”。您可以通过键入以下命令来安装它: sudo apt-get install apt
我的系统有软管吗?我该如何从这场灾难中恢复过来?
答案1
我想您仍然有这些软件包/var/cache/apt/archives/
,如果您仍然有dpkg
,那么您应该能够再次安装这些软件包。登录root
并重新安装它们:
sudo -i
cd /var/cache/apt/archives/
# find the newest "apt" and "gnupg" package
ls -l apt_*.deb gnupg_*.deb
# inspect the filenames and install the right version
dpkg -i apt_1.0.1ubuntu2.17.deb gnupg_1.4.16-1ubuntu2.4.deb