# Unable to install Elasticsearch - problem with public key

**URL:** <https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907>\
**Category:** Elasticsearch\
**Created:** [October 31, 2018, 6:12pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907 "2018-10-31T18:12:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![khalid\_iqbal](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@khalid\_iqbal](https://discuss.elastic.co/u/khalid_iqbal)\
**Post date:** [October 31, 2018, 6:12pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907/1 "2018-10-31T18:12:59Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 31, 2018, 8:15pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907/2 "2018-10-31T20:15:17Z")

</div>

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](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/deb.html)

---

<div class="post-metadata">

**Author:** ![khalid\_iqbal](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@khalid\_iqbal](https://discuss.elastic.co/u/khalid_iqbal)\
**Post date:** [November 1, 2018, 11:11am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907/3 "2018-11-01T11:11:06Z")

</div>

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](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](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](http://security.ubuntu.com/ubuntu) bionic-security InRelease [83,2 kB]  
Hit:2 [http://fr.archive.ubuntu.com/ubuntu](http://fr.archive.ubuntu.com/ubuntu) bionic InRelease  
Hit:3 [http://fr.archive.ubuntu.com/ubuntu](http://fr.archive.ubuntu.com/ubuntu) bionic-updates InRelease  
Get:4 [http://fr.archive.ubuntu.com/ubuntu](http://fr.archive.ubuntu.com/ubuntu) bionic-backports InRelease [74,6 kB]  
Get:5 [http://cdn-fastly.deb.debian.org/debian](http://cdn-fastly.deb.debian.org/debian) jessie-backports InRelease [166 kB]  
Ign:6 [https://artifacts.elastic.co/packages/6.x/apt](https://artifacts.elastic.co/packages/6.x/apt) stable InRelease  
Err:5 [http://cdn-fastly.deb.debian.org/debian](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](https://artifacts.elastic.co/packages/6.x/apt) 6 InRelease  
Hit:8 [https://artifacts.elastic.co/packages/6.x/apt](https://artifacts.elastic.co/packages/6.x/apt) stable Release  
Err:10 [https://artifacts.elastic.co/packages/6.x/apt](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](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](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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 1, 2018, 7:07pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907/4 "2018-11-01T19:07:42Z")

</div>

> [@khalid\_iqbal](#):
>
> W: GPG error: [Index of /debian](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

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 29, 2018, 7:07pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-problem-with-public-key/154907/5 "2018-11-29T19:07:48Z")

</div>

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