我有Ubuntu16.04.05LTS 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
它总是给我这个错误与任何类型的存储库,我试图添加。我已经尝试过许多解决方案,我将在下面列出它们:
拒绝许可:‘/etc/apt/google.list.d/google-等’
还有许多其他的解决方案。没人为我工作。
问候
file /etc/apt/sources.list
的输出如下所示:
/etc/apt/sources.list: ASCII text
发布于 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
它就能完成任务。
问候
https://askubuntu.com/questions/1108871
复制相似问题