I have accidentally removed apt-get and aptitude (Debian 6) [closed]
Вопрос
After I have removed libusb-0.1-4 packet, I tried to install a new one when I realized that I have also removed apt-get.
tbarry@darkstar:~$ sudo apt-get install libusb-1.0-0
sudo: apt-get: command not found
tbarry@darkstar:~$ sudo aptitude install libusb-1.0-0
sudo: aptitude: command not found
could someone know how to reinstall apt without apt?
Решение
Download the apt...version.deb
from https://packages.debian.org/search?keywords=apt and then install it via sudo dpkg -i /path/to/apt..version.deb
. As long a dpkg is not removed everything is recoverable. Then install aptitude
via apt-get
.
Другие советы
You could download the apt
(or aptitude
) package in .deb
form with wget
(or any other HTTP or FTP client), then use dpkg -i
to install that apt*.deb
package.
If dpkg
complains about a missing dependency, install that dependency likewise.