执行命令:source /etc/apt/sources.list 时,报错:Command 'deb' not found, did you mean: command 'dab' from deb bsdgames (2.17-28build1) command 'derb' from deb icu-devtools (66.1-2ubuntu2.1) command 'deb3' from deb quilt (0.65-3) command 'debc' from deb devscripts (2.20.2ubuntu2) command 'dex' from deb dex (0.8.0-2) command 'debi' from deb devscripts (2.20.2ubuntu2) command 'dep' from deb go-dep (0.5.4-3ubuntu0.1) command 'dub' from deb dub (1.19.0-1build2.1) command 'edb' from deb edb-debugger (1.0.0-1build3) Try: apt install <deb name> Command 'deb' not found, did you mean: command 'dub' from deb dub (1.19.0-1build2.1) command 'edb' from deb edb-debugger (1.0.0-1build3) command 'dex' from deb dex (0.8.0-2) command 'debc' from deb devscripts (2.20.2ubuntu2) command 'deb3' from deb quilt (0.65-3) command 'debi' from deb devscripts (2.20.2ubuntu2) command 'dep' from deb go-dep (0.5.4-3ubuntu0.1) command 'dab' from deb bsdgames (2.17-28build1) command 'derb' from deb icu-devtools (66.1-2ubuntu2.1) Try: apt install <deb name> deb-src: command not found
时间: 2023-07-28 12:06:49 浏览: 394
这个错误提示看起来很奇怪,因为它似乎在尝试执行一个命令 'deb',但是在Ubuntu中并没有这个命令。实际上,这个命令应该是在/etc/apt/sources.list文件中的一个关键字,用于指定软件源。因此,我建议你检查一下这个文件,看看是否有任何语法错误,或者是否有任何未知的关键字。你可以使用以下命令来检查此文件:
```
sudo nano /etc/apt/sources.list
```
如果你发现有任何语法错误,请修复它们并保存文件。然后运行以下命令以重新加载软件包列表:
```
sudo apt update
```
如果你仍然遇到相同的错误,请尝试重新安装apt软件包:
```
sudo apt install --reinstall apt
```
希望这可以解决你的问题。
相关问题
source /etc/apt/sources.list Command 'deb' not found, did you mean: command 'deb3' from deb quilt (0.65-3) command 'derb' from deb icu-devtools (66.1-2ubuntu2.1) command 'dub' from deb dub (1.19.0-1build2.1) command 'debc' from deb devscripts (2.20.2ubuntu2) command 'dab' from deb bsdgames (2.17-28build1) command 'edb' from deb edb-debugger (1.0.0-1build3) command 'debi' from deb devscripts (2.20.2ubuntu2) command 'dep' from deb go-dep (0.5.4-3ubuntu0.1) command 'dex' from deb dex (0.8.0-2) Try: sudo apt install <deb name>
It seems like the 'deb' command is not recognized. You can try running the following command to install it:
```
sudo apt install debian-archive-keyring
```
Then, try running the 'source /etc/apt/sources.list' command again.
root用户下 apt-get update报错:apt-get: command not found
在root用户下,如果执行apt-get update命令报错"apt-get: command not found",可能是因为系统中没有安装apt-get工具。apt-get是Debian和Ubuntu系统中用于包管理的命令行工具。
解决这个问题的方法是安装apt-get工具。根据提供的引用内容,可以使用以下步骤来安装apt-get工具:
1. 执行以下命令来更新包列表:
```shell
apt-get update
```
2. 如果更新包列表时出现错误,可能是因为系统使用的是归档的Debian镜像源。可以通过修改源地址来解决这个问题。执行以下命令来备份原文件并添加归档源地址:
```shell
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://archive.debian.org/debian/ jessie main" >> /etc/apt/sources.list
echo "deb-src http://archive.debian.org/debian/ jessie main" >> /etc/apt/sources.list
```
3. 重新执行更新包列表的命令:
```shell
apt-get update
```
4. 最后,执行以下命令来安装vim:
```shell
apt-get install -y vim
```
这样就可以在root用户下成功执行apt-get update和apt-get install命令了。
阅读全文