First, I tried to install elasticsearch according to the instructions on the website https://www.elastic.co/guide/en/kibana/current/deb.html
but after echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-8.x.list
deb https://artifacts.elastic.co/packages/8.x/apt stable main
but after that, when I try to $ sudo apt-get update
> E: Conflicting values set for option Signed-By regarding source
> https://artifacts.elastic.co/packages/8.x/apt/ stable:
> /usr/share/keyrings/elasticsearch-keyring.gpg != E: The list of
> sources could not be read.
but in keyrings, there is no elasticsearch-keyring.gpg
in keyrings,
docker-archive-keyring.gpg
ubuntu-advantage-ros.gpg
ubuntu-advantage-cc-eal.gpg
ubuntu-archive-keyring.gpg
ubuntu-advantage-cis.gpg
ubuntu-archive-removed-keys.gpg
ubuntu-advantage-esm-apps.gpg
ubuntu-cloudimage-keyring.gpg
ubuntu-advantage-esm-infra-trusty.gpg
ubuntu-cloudimage-removed-keys.gpg
ubuntu-advantage-fips.gpg
ubuntu-master-keyring.gpg
I already changed the file sources.list from /usr/share/doc/apt/examples/ to /etc/apt/
for reset the list
I don't know how to get it back. I can't install any package through apt now
someone please, help me T_T
I am by no means a linux or elasticsearch expert. I don't know if this is a GOOD solution. It could be a very nasty and BAD solution.
...But it allowed me to use apt-get again when I was having the same problem. Who knows, maybe the people who actually know the "correct" solution will respond if I trigger them with a dirty hack, haha.
In /etc/apt/sources.list.d, there's a file called "elastic-8.x.list", the same one used in the command you used above for installation. I removed the file and I could use apt-get again.
sudo rm /etc/apt/sources.list.d/elastic-8.x.list
I also removed the elasticsearch keyring, but that on it's own didn't work. It was removing the elastic list file that allowed things to work again.
sudo rm /usr/share/keyrings/elasticsearch-keyring.gpg
I hope my answer was helpful!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With