恢复dpkg
从光盘中拷贝出 dpkg*.deb
解压
yjwork@ubuntu:/$ ar x dpkg*.deb
yjwork@ubuntu:# sudo mv data.tar.gz /data.tar.gz
yjwork@ubuntu: # cd /
yjwork@ubuntu: # sudo tar xzfv data.tar.gz
yjwork@ubuntu:/$ sudo apt-get install dpkg
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
stardict-common intltool-debian libbeecrypt6 g++-4.1 librpm4 po-debconf g++
libstdc++6-4.1-dev gettext libgtk2-gladexml-perl rpm html2text
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
dpkg
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
Need to get 0B/1947kB of archives.
After unpacking 6169kB of additional disk space will be used.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "zh_CN:zh",
LC_ALL = (unset),
LANG = "zh_CN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: unable to initialize frontend: Gnome
debconf: (Unable to load Gnome -- is libgnome2-perl installed?)
debconf: falling back to frontend: Dialog
Selecting previously deselected package dpkg.
(Reading database ... 73013 files and directories currently installed.)
Unpacking dpkg (from .../dpkg_1.13.24ubuntu6_i386.deb) ...
Setting up dpkg (1.13.24ubuntu6) ...
不过系统删料那么多软件,恢复起来还不如重装
上面是一个真实的测试
如果你喜欢,JUST DO IT!