更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
presio
帖子: 2
注册时间: 2008-08-15 22:48

更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#1

帖子 presio » 2008-12-06 21:31

不能够初始化包信息

初始化包信息时遇到无法解决的问题。

请汇报这个此 'update-manager' 软件包的错误,并且将如下信息包含在报告中:

'E:安装源配置文件“/etc/apt/sources.list”第 2 行有错误 (URI parse), E:无法读取安装源列表。'


然后用文本编辑器打开sources.list如下:

deb http://archive.ubuntu.org.cn/ubuntu-cn/ hardy main restricted universe multiverse
deb 中国 hardy main restricted universe
deb 中国 hardy-security main restricted universe
deb 中国 hardy-updates main restricted universe

deb http://cn.archive.ubuntu.com/ubuntu/ hardy main universe
deb http://security.ubuntu.com/ubuntu/ hardy-security universe main
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates universe main


求解~烦请详细一点,我是一个终端命令都不会的废柴~~TAT
西贝土方木点
帖子: 243
注册时间: 2008-09-13 16:34

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#2

帖子 西贝土方木点 » 2008-12-06 21:49

换下更新源
换成主服务器
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#3

帖子 Wjian » 2008-12-06 21:55

建议在系统-软件源,里面选择服务器,就个比较好一点,新手最好不要直接编辑源列表.
presio
帖子: 2
注册时间: 2008-08-15 22:48

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#4

帖子 presio » 2008-12-06 22:12

谢谢,可是我现在已经改不了更新源了。
选完服务器,点“关闭”的时候提示:

E: 安装源配置文件“/etc/apt/sources.list”第 2 行有错误 (URI parse)
E: 无法锁定列表目录


E: 安装源配置文件“/etc/apt/sources.list”第 2 行有错误 (URI parse)
E: 所列资源不可读。
情转到软件库对话框修正该问题。
E: _cache->open() failed, please report.
hengyunabc
帖子: 27
注册时间: 2008-06-21 21:50

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#5

帖子 hengyunabc » 2008-12-06 22:21

自己编辑多几次就知道了。
sudo gedit /etc/apt/sources.list
然后把从网上找的源列表贴上去,试多几次就能找到合适自己用的源了。
头像
xieshaohu
帖子: 1565
注册时间: 2007-10-24 20:20
来自: 北京、海淀
联系:

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#6

帖子 xieshaohu » 2008-12-06 22:21

给你我的sources.list文件的内容。
我现在用的是主服务器的更新源
你在控制台里输入sudo gpedit /etc/apt/sources.list用我的sources.list文件内容替换一下看看。

代码: 全选

# deb cdrom:[Ubuntu 8.10 _Intrepid Ibex_ - Release amd64 (20081029.4)]/ intrepid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://archive.ubuntu.com/ubuntu/ intrepid main restricted
deb-src http://archive.ubuntu.com/ubuntu/ intrepid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ intrepid universe
deb-src http://archive.ubuntu.com/ubuntu/ intrepid universe
deb http://archive.ubuntu.com/ubuntu/ intrepid-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ intrepid multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid multiverse
deb http://archive.ubuntu.com/ubuntu/ intrepid-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cn.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu intrepid partner
# deb-src http://archive.canonical.com/ubuntu intrepid partner

deb http://archive.ubuntu.com/ubuntu/ intrepid-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-security main restricted
deb http://archive.ubuntu.com/ubuntu/ intrepid-security universe
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-security universe
deb http://archive.ubuntu.com/ubuntu/ intrepid-security multiverse
deb-src http://archive.ubuntu.com/ubuntu/ intrepid-security multiverse
Dell Vostro 1500, T7300/4GB/WD5000BEVT/nVidia 8400GM, Ubuntu 10.04 x86_64/VMware 7(Win7)
我的博客:http://xieshaohu.wordpress.com/
头像
jandyzhu
帖子: 3331
注册时间: 2008-04-02 13:26
来自: 上海
联系:

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#7

帖子 jandyzhu » 2008-12-06 22:25

1、安装Ubuntu的超级兔子:Ubuntu Tweak http://jandy.cn/blog/?p=1147
2、应用程序--系统工具--Ubuntu Tweak--应用程序--源编辑器--解锁--把里面的所有东西删除。
3、在源列表 http://wiki.ubuntu.org.cn/index.php?tit ... iant=zh-cn 里找一个合适的源,复制到Ubuntu Tweak的源编辑器里。
注意:一定要选对版本!
4、保存后点刷新。
Wjian
帖子: 2044
注册时间: 2005-08-07 18:34
系统: android 4.2.1
来自: 湛江

Re: 更新时提示:安装源配置文件“/etc/apt/sources.list”第 2 行有错误

#8

帖子 Wjian » 2008-12-06 22:25

晕啊,我也不懂恢复源列表,一菜鸟呀 :em06 不知编辑前你有没有备份,上WIKI找一个对应版本的源吧,问题好像出来带有"中国"字样的行上.
回复