[Seek Help] 在终端中出现以下问题怎么办?
Tofloor
poster avatar
mardou
deepin
2022-05-01 03:33
Author

在终端出现如下问题,该如何解决?

mardou@mardou-PC:~$ sudo apt-get update

E: 在源列表 /etc/apt/sources.list 中第 2 行有误 (类型)

E: 无法读取源列表。

mardou@mardou-PC:~$

Reply Favorite View the author
All Replies
whoam1
deepin
2022-05-01 03:39
#1

/etc/apt/sources.list 这个文件内容有错误,你修改正确了在更新系统

Reply View the author
hotime
deepin
2022-05-01 03:42
#2

这提示很清楚了,“在源列表 /etc/apt/sources.list 中第 2 行有误 (类型)”,你应该将该文件的内容贴出来,看看是不是正常。

cat /etc/apt/sources.list
Reply View the author
谢克辉
deepin
2022-05-01 03:58
#3

使用终端输入这个命令再更新:sudo sh -c 'echo "## Generated by deepin-installer\ndeb https://community-packages.deepin.com/deepin/ apricot main contrib non-free\n#deb-src https://community-packages.deepin.com/deepin/ apricot main contrib non-free\ndeb [trusted=yes] https://proposed-packages.deepin.com/dde-apricot unstable main contrib non-free" > /etc/apt/sources.list'

Reply View the author
mardou
deepin
2022-05-01 04:10
#4
hotime

这提示很清楚了,“在源列表 /etc/apt/sources.list 中第 2 行有误 (类型)”,你应该将该文件的内容贴出来,看看是不是正常。

cat /etc/apt/sources.list

image.png

Reply View the author
mardou
deepin
2022-05-01 04:12
#5
谢克辉

使用终端输入这个命令再更新:sudo sh -c 'echo "## Generated by deepin-installer\ndeb https://community-packages.deepin.com/deepin/ apricot main contrib non-free\n#deb-src https://community-packages.deepin.com/deepin/ apricot main contrib non-free\ndeb [trusted=yes] https://proposed-packages.deepin.com/dde-apricot unstable main contrib non-free" > /etc/apt/sources.list'

这样操作对吗?

image.png

Reply View the author
deepin-superuser
deepin
2022-05-01 04:15
#6
mardou

这样操作对吗?

image.png

你再试试更新

Reply View the author
谢克辉
deepin
2022-05-01 04:39
#7
mardou

这样操作对吗?

image.png

这个代码是重新写入内测源

Reply View the author
mardou
deepin
2022-05-01 04:49
#8
deepin-superuser

你再试试更新

可升级了。谢谢!

Reply View the author
mardou
deepin
2022-05-01 04:50
#9
谢克辉

这个代码是重新写入内测源

好的

Reply View the author
hotime
deepin
2022-05-01 21:26
#10
mardou

image.png

我知道你的问题了,你是从那边帖子里直接复制进去的吧?那个复制完以后,看起来空行的地方实际上还有其它东西,所以提示第2行有误(类型),把看起来空行的地方删掉就正常了。

Reply View the author
mardou
deepin
2022-05-01 23:38
#11
hotime

我知道你的问题了,你是从那边帖子里直接复制进去的吧?那个复制完以后,看起来空行的地方实际上还有其它东西,所以提示第2行有误(类型),把看起来空行的地方删掉就正常了。

谢谢了。昨天多次尝试终于把问题解决了。

Reply View the author