Unable to install Elasticsearch - problem with public key

Dear Elastic Community,

I installed Ubuntu on my PC through virtual Box and I am trying to install / explore Elastic.

When in entered following command: sudo apt-get update && sudo apt-get install elasticsearch

I got this error “ **r:3 http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 ”

By doing some search, I found that it could be solved by executing these two commands:

gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553

gpg -a --export 8B48AD6246925553 | apt-key add –

unfortunately, I cannot execute the second command as I am getting an error message although I added SUDO in the beginning

WARNING: unsafe ownership on homedir '/home/khalid/.gnupg'

E: This command can only be used by root.

Thank you in advance for your help

Khalid

What documentation did you follow for installation of Elasticsearch? You should be using https://www.elastic.co/guide/en/elasticsearch/reference/6.4/deb.html

hello Warklom
than you for your answer.
i followed official user guide on elastic website.
i executed following instruction :

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt-get update && sudo apt-get install elasticsearch

this the complete message that i got :

Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83,2 kB]
Hit:2 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Get:4 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease [166 kB]
Ign:6 https://artifacts.elastic.co/packages/6.x/apt stable InRelease
Err:5 http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
Ign:7 https://artifacts.elastic.co/packages/6.x/apt 6 InRelease
Hit:8 https://artifacts.elastic.co/packages/6.x/apt stable Release
Err:10 https://artifacts.elastic.co/packages/6.x/apt 6 Release
404 Not Found [IP: 184.73.245.233 443]
Reading package lists... Done
N: Ignoring file 'elastic.lis' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: GPG error: http://cdn-fastly.deb.debian.org/debian jessie-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
E: The repository 'http://http.debian.net/debian jessie-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/elastic-6.x.list:1 and /etc/apt/sources.list.d/elastic-6.x.list:2

This does not relate to our repo. You may want to check with one of the Debian forums.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.