sudo add-apt-repository ppa:问题!

sudo add-apt-repository ppa:问题!

我有 UBUNTU 16.04.05 LTS X64当我尝试添加任何存储库时出现以下错误!

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

    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

无论我尝试添加哪种存储库,它总是会给我这个错误。我尝试过很多解决方案,我将在下面列出它们:

错误:运行 add-apt 存储库 ppa:

如何安装命令行证书

权限被拒绝:'/etc/apt/sources.list.d/google-earth.list'

以及针对相关问题的许多其他解决方案。 没人为我工作

这里有什么解决方案吗?

问候

#

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

/etc/apt/sources.list: ASCII text

答案1

我自己已经找到了解决方案。

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

apt.conf.d偏好.d来源列表.d受信任.gpg.d 或者sudo mkdir apt.conf.d sources.list.d trusted.gpg.d

它将完成这项工作。

问候

相关内容