[Newbies] Error: could not find a distribution template for Deepin/n/a
Tofloor
poster avatar
blacklamb
deepin
2021-09-17 06:29
Author

添加ppa软件仓库提示错误:

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

可以通过修改/etc/apt/source.list 手动添加,但总是遇到类似下方的错误,提示没有公共密钥:

W: GPG error: http://ppa.launchpad.net/morphis/anbox-support/ubuntu disco InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 21C6044A875B67B7
E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu disco InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

希望能够像在ubuntu下直接通过 sudo add-apt-repository ppa:morphis/anbox-support 添加,请问有大佬知道该如何解决吗?

 

Reply Favorite View the author
All Replies
fengshuo
Deepin Wiki Editor
2021-09-21 05:25
#1

Deepin基于debian,ppa仓库只有ubuntu系的发行版才支持。

非要从ppa安装软件包的话,手动编辑apt源sources.list后还要手动导入密钥。

密钥可以从仓库的launchpad页面中Technical details一栏复制。

以你要添加的这个ppa为例,执行:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CFD4CCDE77B82D4FA3B113E521C6044A875B67B7
sudo apt update

再安装想要的包就可以了。

Reply View the author
blacklamb
deepin
2021-09-23 18:56
#2
fengshuo

Deepin基于debian,ppa仓库只有ubuntu系的发行版才支持。

非要从ppa安装软件包的话,手动编辑apt源sources.list后还要手动导入密钥。

密钥可以从仓库的launchpad页面中Technical details一栏复制。

以你要添加的这个ppa为例,执行:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CFD4CCDE77B82D4FA3B113E521C6044A875B67B7
sudo apt update

再安装想要的包就可以了。

多谢大佬相助。我刚从ubuntu转过来的,习惯了通过ppa下载各种应用,所以感觉还是不太能离得了ppa。

手动添加source.list可以,但是每次都要去找对应的public key感觉有点麻烦。

Reply View the author
ss1750
deepin
2023-07-20 08:16
#3

安装typora遇到同样的问题,原来是这个原因

Reply View the author