システムの破損:sudo apt-getを削除するgnupgを元に戻す方法

システムの破損:sudo apt-getを削除するgnupgを元に戻す方法

誤って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

おすすめ記事