0

I have UBUNTU 16.04.05 LTS X64 and when I try to add any repositories I'm having the following error!

for example I have used: sudo add-apt-repository ppa:noobslab/apps and the result is:

    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

it always gives me this error with any sort of repositories that I try to add. I have tried many solutions I'm going to list them below:

Error : Running add-apt repository ppa:

How to install certificates for command line

Permission denied: '/etc/apt/sources.list.d/google-earth.list'

and many many other solutions given to related problems. no one worked for me.

is there any solutions here?

regards

#

output of file /etc/apt/sources.list is shown below:

/etc/apt/sources.list: ASCII text

  • 1
    Please, edit your question to post the output of file /etc/apt/sources.list. – Olimjon Jan 11 '19 at 15:10
0

I have found the solution on my own.

In /etc/apt just create the following directories:

apt.conf.d, preferences.d, sources.list.d, trusted.gpg.d or sudo mkdir apt.conf.d sources.list.d trusted.gpg.d

It will do the job.

Regards

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.