![如何修复 apt-get:在 Ubuntu 18.10 中未找到命令?](https://linux22.com/image/908194/%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%20apt-get%EF%BC%9A%E5%9C%A8%20Ubuntu%2018.10%20%E4%B8%AD%E6%9C%AA%E6%89%BE%E5%88%B0%E5%91%BD%E4%BB%A4%EF%BC%9F.png)
我尝试使用sudo apt-get
命令在 Ubuntu 18.10 中安装软件,但它给出了错误 – apt-get: command not found
。我使用locate apt-get
并发现 apt-get 位于/usr/bin
,它在 中$PATH
。它仍然给了我错误。我该怎么办?
$ sudo apt-get
sudo: apt-get: command not found
$ locate apt-get
/snap/core/5662/usr/local/bin/apt-get
/snap/core/5662/usr/share/bash-completion/completions/apt-get
/snap/core/5662/usr/share/bash-completion/completions/slapt-get
/snap/core/5897/usr/local/bin/apt-get
/snap/core/5897/usr/share/bash-completion/completions/apt-get
/snap/core/5897/usr/share/bash-completion/completions/slapt-get
/snap/core/6130/usr/local/bin/apt-get
/snap/core/6130/usr/share/bash-completion/completions/apt-get
/snap/core/6130/usr/share/bash-completion/completions/slapt-get
/usr/local/bin/apt-get
/usr/share/bash-completion/completions/apt-get
/usr/share/bash-completion/completions/slapt-get
/usr/share/man/de/man8/apt-get.8.gz
/usr/share/man/fr/man8/apt-get.8.gz
/usr/share/man/it/man8/apt-get.8.gz
/usr/share/man/ja/man8/apt-get.8.gz
/usr/share/man/man8/apt-get.8.gz
/usr/share/man/nl/man8/apt-get.8.gz
$ echo $PATH
/home/guan/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
:/bin:/usr/games:/usr/local/games:/snap/bin