-1

I'm receiving this error; Here (No I can't copy the text and embed it to follow your forum's rules, apologies) which links to this command (or anything involving apt-get operations excluding the help command).

An error occurred, please run Package Manager from the right-click menu   
or apt-get in a terminal to see what is wrong.   
The error message was:   
'Error: Opening the cache (E:Conflicting values set for option Signed-By regarding source   
https:// mirror.mwt.me/shiftkey-desktop/deb/any:/ usr/share/keyrings/mwt-desktop.gpg != /etc/ apt/keyrings/shiftkey-desktop.asc, 
E:The list of sources could not be read.)'.   
This usually means that your installed packages have unmet dependencies.  
loki@compooter:~$ sudo apt-get check
[sudo] password for loki: 
E: Conflicting values set for option Signed-By regarding source https://mirror.mwt.me/shiftkey-desktop/deb/ any: /usr/share/keyrings/mwt-desktop.gpg != /etc/apt/keyrings/shiftkey-desktop.asc
E: The list of sources could not be read.

This was caused by trying to install github-desktop for Ubuntu using this guide. I already tried the following resources such as this among others.

Could anyone lend me a hand in resolving the error? I don't need the software installed, but if you could answer as to why it causes this error alongside how to get the software up and running I'd be even more thankful than I already am (bearing in mind trying to install it resulted in a few soft locks on my system too which could be to do with other factors, so I haven't mentioned this, but it may be something to take into consideration).

If not, I'll try to figure it out on my own.

karel
  • 122,292
  • 133
  • 301
  • 332

1 Answers1

0

Here's the question author's solution for future users.

First of all find where the option "Signed-By" is used by apt-get we know it's a command line function, so if it's mentioned it has to be physically somewhere and it mentions a source being accessed too - this must be stored! After all the second error message indicates this (potentially), so it's here and here. Then it's got to be one of these (The source list /etc/apt/sources.list and the files contained in /etc/apt/sources.list.d/)

It's the second one. I've already deleted other files according to the guide and question answered here on stack, so what else could it possibly be accessing?. Going through the files we find out mwt-desktop.list contains a reference to the source of https://mirror.mwt.me/shiftkey-desktop/deb/, so if we delete that (and not any of the shiftkey...lists as this is mentioned more than once, so I doubt it could be the root file that's causing the issue and it has a "package" and a "desktop" "variation". It only mentions one list being unable to be read too, and these have .list at the end, so it's got to be these files, that's common sense I guess. Let's delete it, and see what happens!

We find out that after running sudo apt-get check everything is fine! We might want to run sudo apt-get install and sudo apt-get autoremove just to be sure any more artifacts of GHDT (Github Desktop) get purged (the install was a guess, it rebuilds packages that's cool... or maybe it just needed updating... anyway! It's probably a good thing I didn't try installing software before running autoremove)

Everything seems fine now, although the error symbol is still in my taskbar. I ran sudo apt-get install snap and it's gone! Here's the log in case anyone wants it. It's verbose, so I tidied it up.

$ sudo apt-get check
E: Conflicting values set for option Signed-By regarding source https://mirror.mwt.me/shiftkey-desktop/deb/ any: /usr/share/keyrings/mwt-desktop.gpg != /etc/apt/keyrings/shiftkey-desktop.asc
E: The list of sources could not be read.
loki@compooter:~$ cd /etc/apt
loki@compooter:/etc/apt$ sudo rm mwt-desktop.list
[sudo] password for loki: 
rm: cannot remove 'mwt-desktop.list': No such file or directory
loki@compooter:/etc/apt$ ls
apt.conf.d   keyrings       sources.list    sources.list.save
auth.conf.d  preferences.d  sources.list.d  trusted.gpg.d
loki@compooter:/etc/apt$ cd ~/etc/apt/
bash: cd: /home/loki/etc/apt/: No such file or directory
loki@compooter:/etc/apt$ cd sources.list.d
loki@compooter:/etc/apt/sources.list.d$ ls
google-chrome.list                  shiftkey-desktop.list   vscode.list
mwt-desktop.list                    shiftkey-packages.list  vscode.list.save
packagecloud-shiftkey-desktop.list  steam.list.save
loki@compooter:/etc/apt/sources.list.d$ sudo rm mwt-desktop.list
loki@compooter:/etc/apt/sources.list.d$ sudo apt-get check
(Success!)
loki@compooter:/etc/apt/sources.list.d$ sudo apt-get install
(Success!)
loki@compooter:/etc/apt/sources.list.d$ sudo apt-get autoremove
(Success!)
loki@compooter:~$ sudo apt-get install snap
(Success!)
karel
  • 122,292
  • 133
  • 301
  • 332