[Newbies] Unable To Add Repository
Tofloor
poster avatar
wali
deepin
2021-03-08 20:15
Author

Hi, when I run the add-apt-repository command I get the following error:

WARNING: Failed to read mirror file
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 95, 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 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Deepin/n/a

 

I tried the steps given in the following links but to no avail.

https://unix.stackexchange.com/questions/520715/deepin-15-10-error-could-not-find-a-distribution-template-for-deepin-stable

https://wiki.deepin.org/wiki/Package_management#Error_when_add_PPA_repository

Reply Favorite View the author
All Replies
z***y@gmail.com
deepin
2021-03-08 20:47
#1

Have you tried the below command?

sudo apt-get install software-properties-common

If the above command does not resovle your issue, you can try to replace $(lsb_release -ics) in your command to debian buster

 

 

Reply View the author
wali
deepin
2021-03-08 23:16
#2
z***y@gmail.com

Have you tried the below command?

sudo apt-get install software-properties-common

If the above command does not resovle your issue, you can try to replace $(lsb_release -ics) in your command to debian buster

 

 

Yes I have tried running sudo apt-get install software-properties-common.

Could you please provide more detail as to what is supposed to be replaced by "debian buster"

Reply View the author
z***y@gmail.com
deepin
2021-03-10 17:08
#3
wali

Yes I have tried running sudo apt-get install software-properties-common.

Could you please provide more detail as to what is supposed to be replaced by "debian buster"

I'm not sure what apt repository are you trying to add?

Let's use docker isntallation as an example:

To install docker, you need to run soemthing like:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" 

Just change the $(lsb_release -cs) to buster 

So the command becomes:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"

This is becasue the latest deepin is based on debian buster: https://wiki.debian.org/DebianBuster#:~:text=Buster%20is%20the%20development%20codename,Release%20and%20updates

Hope it helps.

 

Reply View the author
wali
deepin
2021-03-11 02:21
#4

Hi, thanks for the reply.

Unfortunately, running the command you sent above as an example also returns the same error as mentioned in my question.

Reply View the author
z***y@gmail.com
deepin
2021-03-11 16:54
#5
wali

Hi, thanks for the reply.

Unfortunately, running the command you sent above as an example also returns the same error as mentioned in my question.

Can you show me the command you are trying to execute?

Reply View the author
wali
deepin
2021-03-11 20:11
#6

Hi, I was talking about the command to add the repository for installing docker you sent above as an example: 

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable"

Reply View the author
isuru
deepin
2023-01-10 05:13
#7
z***y@gmail.com

Have you tried the below command?

sudo apt-get install software-properties-common

If the above command does not resovle your issue, you can try to replace $(lsb_release -ics) in your command to debian buster

 

 

Hi bro..

Im tryanna add following respotary and it looks like this 👉

"$ sudo add-apt-repository ppa:shawn-p-huang/ppa"

I already added "$ sudo apt-get install software-properties-common".

But I always get this error: 👇

Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, 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 93, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Deepin/apricot

And I refered your links and did as they mentioned. but no hope😔

Reply View the author