0

No APT commands are working for me.

According to some posts on this site, the solution would be to change my server. So I tried to change it in settings/software and choose the best server.

However, after downloading cache and other stuffs, I have this error message

Failed to download repository information. Check your Internet connection.

But my connection is fine. In details I have:

W:Target Packages (Packages) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2,
W:Target Translations (en) is configured multiple times in /etc/apt/sources.list.d/arc-theme.list:1 and /etc/apt/sources.list.d/arc-theme.list:2,
W:GPG error: htps://repo.skype.com /deb stable InRelease:
 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3,
W:The repository 'htps://repo.skype.com/deb stable InRelease' is not signed.
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
W:See apt-secure(8) manpage for repository creation and user configuration details.
W:An error occurred during the signature verification. The repository is not updated and the previous index files will be used. 
GPG error: htp://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04  Release:
 The following signatures were invalid: KEYEXPIRED 1496576244, 
W:The repository 'htp://ppa.launchpad.net/cdekter/ppa/ubuntu xenial Release' does not have a Release file.
W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
W:See apt-secure(8) manpage for repository creation and user configuration details.
W:Failed to fetch htp://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/Release.gpg  The following signatures were invalid: KEYEXPIRED 1496576244,
E:Failed to fetch http://ubnt-archive.xfree.com.ar/ubuntu/dists/xenial-updates/universe/i18n/Translation-en.xz  Hash Sum mismatch, 
E:Failed to fetch http://ppa.launchpad.net/cdekter/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
W:Some index files failed to download. They have been ignored, or old ones used instead.
Zanna
  • 70,465

1 Answers1

1

Your repositories seem to be quite a mess. No wonder APT is not working. I am not sure how good you kept track of all your non-standard repositories and PPAs, but your are missing most of the certificates, so the system cannot work.

I guess you are aware that the apt update command is laying the base for apt upgrade and apt install to work. apt update is comparing your system state to that of the repositories and updates your local repository information before downloading any installation files.

This works with the configuration files in

 etc/apt/...

with the main file being

 etc/apt/sources.list

You have an optional directory

 etc/apt/sources.list.d/.. 

that seems to be quite messed up.

My recommendation would be to make a backup of that directory, then delete the contents of your /etc/apt/sources.list.d folder and replace the original sources.list (you surely made a backup? If not see How do I restore the default repositories? or get the /etc/apt/sources.list from an Ubuntu installation disk and copy it onto your installed system). Then try again.

After fixing your repositories the process

sudo apt update
sudo apt upgrade
sudo apt install <whatever you want>

should work again.

If so I would recommend to include your alternative repositories into the sources.list file and step by step and check with apt upgrade if there is anything missing. The keys you might still have for your PPA can be copied into the /etc/apt/trusted.gpg.d directory.

Zanna
  • 70,465
CatMan
  • 1,399
  • Hello Catman!

    Thank you very much for the answer! My version of Ubuntu is lts 16.04

    I didn't do any backup and don't have the installation cd, is it possible to get the files online ?

    Thank you very much!

    – marchika Jul 24 '17 at 17:45
  • Sure, just download the installation pack from the ubuntu web site and either make a bootable USB stick or burn a DVD. – CatMan Jul 27 '17 at 19:01