실수로 GnuPG를 삭제하고 시스템이 손상되었습니다! 내가 입힌 피해를 복구하도록 도와줄 수 있는 사람이 있나요?
왜:
저는 GnuPG2를 사용하고 있는데 실수로 gpg2 대신 gpg를 사용하게 되었기 때문에 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