我失去了 get-apt 更新能力

我失去了 get-apt 更新能力

我不确定我在这里做了什么,但我收到了错误消息:

:~$ sudo apt-get update
sudo: apt-get: command not found

:~$ sudo adduser ihansen
sudo: adduser: command not found

:~$ sudo /etc/apt/sources.list
sudo: /etc/apt/sources.list: com`

sudo: dpkg: command not found

无论我做了什么,我还是失去了 sudo 访问权限。我能够恢复 sudo 访问权限,但现在我面临这个问题。我是 Linux 新手,任何帮助我都感激不尽。由于我是初学者,如果有解决方案,您能否列出所有步骤?

我正在运行 Ubuntu 20.04.2 LTS Focal。

感谢您的帮助!

:~$ sudo /usr/bin/sudo -l

Matching Defaults entries for root on ubuntuserver:
    env_reset, mail_badpass,
    secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbi$

User root may run the following commands on ubuntuserver:
    (ALL : ALL) ALL
    (ALL : ALL) ALL

####################################################################

:~$ cd /var/backups && ls
alternatives.tar.0        dpkg.diversions.1.gz    dpkg.statoverride.6.gz
alternatives.tar.1.gz     dpkg.diversions.2.gz    dpkg.status.0
alternatives.tar.2.gz     dpkg.diversions.3.gz    dpkg.status.1.gz
alternatives.tar.3.gz     dpkg.diversions.4.gz    dpkg.status.2.gz
apt.extended_states.0     dpkg.diversions.5.gz    dpkg.status.3.gz
apt.extended_states.1.gz  dpkg.diversions.6.gz    dpkg.status.4.gz
apt.extended_states.2.gz  dpkg.statoverride.0     dpkg.status.5.gz
apt.extended_states.3.gz  dpkg.statoverride.1.gz  dpkg.status.6.gz
apt.extended_states.4.gz  dpkg.statoverride.2.gz  group.bak
apt.extended_states.5.gz  dpkg.statoverride.3.gz  gshadow.bak
apt.extended_states.6.gz  dpkg.statoverride.4.gz  passwd.bak
dpkg.diversions.0         dpkg.statoverride.5.gz  shadow.bak

#########################################################################

:~$ cd /var/lib/dpkg && ls
alternatives  diversions      lock           statoverride      status-old
available     diversions-old  lock-frontend  statoverride-old  triggers
cmethopt      info            parts          status            updates

相关内容