添加软件源错误
Tofloor
poster avatar
stevenctao
deepin
2014-05-29 22:22
Author
sudo add-apt-repository ppa:teejee2008/ppa

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 91, in
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)   
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Deepin/trusty

这个什么问题
Reply Favorite View the author
All Replies
Bluek404
deepin
2014-05-29 22:38
#1
楼主不会用的是我打包的系统吧= =
Reply View the author
cxbii
deepin
2014-05-30 05:26
#2
2014么?
我没没发现什么问题
Reply View the author
Bluek404
deepin
2014-05-30 06:44
#3
2014么?
我没没发现什么问题
估计是用我打包的那个……
话说这个问题我之前问过,cxbii你说帮忙问了
结果怎么样
Reply View the author
cxbii
deepin
2014-05-30 07:29
#4
[quote]2014么?
我没没发现什么问题
估计是用我打包的那个……
话说这个问题我之前问过,cxbii你说帮忙问了
结果怎么样[/quote]
帮问了,但是开发者没空
Reply View the author
Bluek404
deepin
2014-05-30 07:46
#5
[quote][quote]2014么?
我没没发现什么问题
估计是用我打包的那个……
话说这个问题我之前问过,cxbii你说帮忙问了
结果怎么样[/quote]
帮问了,但是开发者没空[/quote]
:cry:
Reply View the author
stevenctao
deepin
2014-05-30 15:09
#6
官方下载的beta版,更新后 就这样了
Reply View the author
stevenctao
deepin
2014-05-30 17:32
#7
百度了一下,很多人都出现过这个问题
Reply View the author
Bluek404
deepin
2014-05-30 18:07
#8
网上找到了:
之前出现了终端添加源出错,还有就是“软件源”不能打开的问题,在网上找了很久,才找到了解决办法,办法如下:

"系统"-"软件源"无法使用。在终端运行sudo software-properties-gtk,将得到如下出错信息:
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 113, in#
app = SoftwarePropertiesGtk(datadir=data_dir, options=options, file=file)
File "/usr/lib/python2.6/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 87, in __init__3 h7 _)
SoftwareProperties.__init__(self, options=options, datadir=datadir)
File "/usr/lib/python2.6/dist-packages/softwareproperties/SoftwareProperties.py", line 90, in __init__
self.reload_sourceslist()
File "/usr/lib/python2.6/dist-packages/softwareproperties/SoftwareProperties.py", line 538, in reload_sourceslist"
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python2.6/dist-packages/aptsources/distro.py", line 90, in get_sources
raise NoDistroTemplateException("Error: could not find a "
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template

其错误在于找不到ID为Deepin的sourcelist模版。而ID保存在/etc/lsb-release内,将其第一行
DISTRIB_ID=Deepin
改为
DISTRIB_ID=Ubuntu)
即可解决问题。


按这个办法修改后,问题确实解决了,但是每次重启后,问题又恢复,查看lsb-release,发现文件自动复原了DISTRIB_ID=Deepin,再次修改成Ubuntu,重启后又恢复成Deepin。
于是我就root下设定lsb-release的的文件权限为只读,但不起作用,root后还是可以修改内容。。。。这怎么搞?
Reply View the author
Bluek404
deepin
2014-05-30 18:26
#9
找到解决方法了,
把文件解压到/usr/share/python-apt/templates/就可以了
LinuxDeepin.zip
感谢雨过天晴提供的文件
Reply View the author
stevenctao
deepin
2014-05-30 23:12
#10
回头试一试
Reply View the author
stevenctao
deepin
2014-05-30 23:44
#11
谢谢
Reply View the author