首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >sudo添加-apt-存储库ppa:<一些-包>问题!

sudo添加-apt-存储库ppa:<一些-包>问题!
EN

Ask Ubuntu用户
提问于 2019-01-11 14:15:30
回答 1查看 1K关注 0票数 0

我有Ubuntu16.04.05LTS X64,当我尝试添加任何存储库时,我有以下错误!

例如,我使用了:sudo add-apt-repository ppa:noobslab/apps,结果是:

代码语言:javascript
运行
复制
    This PPA Contains Applications for Ubuntu/Linux Mint from different sources but debianized by http://www.NoobsLab.com
 More info: https://launchpad.net/~noobslab/+archive/ubuntu/apps
Press [ENTER] to continue or ctrl-c to cancel adding it

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 168, in <module>
    if not sp.add_source_from_shortcut(shortcut, options.enable_source):
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 768, in add_source_from_shortcut
    self.set_modified_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 492, in set_modified_sourceslist
    self.save_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 658, in save_sourceslist
    self.sourceslist.save()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 413, in save
    files[source.file] = open(source.file, "w")
FileNotFoundError: [Errno 2] No such file or directory: '/etc/apt/sources.list.d/noobslab-ubuntu-apps-xenial.list'
gpg: keyring `/tmp/tmph_0b92bg/secring.gpg' created
gpg: keyring `/tmp/tmph_0b92bg/pubring.gpg' created
gpg: requesting key F59EAE4D from hkp server keyserver.ubuntu.com
gpg: /tmp/tmph_0b92bg/trustdb.gpg: trustdb created
gpg: key F59EAE4D: public key "Launchpad PPA for NoobsLab" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
gpg: keyblock resource `/etc/apt/trusted.gpg.d/noobslab_ubuntu_apps.gpg': file open error
gpg: no writable keyring found: eof
gpg: error reading `/tmp/tmph_0b92bg/pubring.gpg': general error
gpg: import from `/tmp/tmph_0b92bg/pubring.gpg' failed: general error

它总是给我这个错误与任何类型的存储库,我试图添加。我已经尝试过许多解决方案,我将在下面列出它们:

错误:运行apt存储库ppa:

如何安装命令行的证书

拒绝许可:‘/etc/apt/google.list.d/google-等’

还有许多其他的解决方案。没人为我工作。

这里有什么解决办法吗?

问候

file /etc/apt/sources.list的输出如下所示:

/etc/apt/sources.list: ASCII text

EN

回答 1

Ask Ubuntu用户

发布于 2019-01-12 12:47:34

我自己找到了解决办法。

/etc/apt中,只需创建以下目录:

apt.conf.d,preferences.d,sources.list.d es.list.d,trud.gpg.d或sudo mkdir apt.conf.d sources.list.d trusted.gpg.d

它就能完成任务。

问候

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1108871

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档