# Unable to install elasticsearch on ubuntu 16.04

**URL:** https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225
**Category:** Elasticsearch
**Created:** [July 9, 2018, 6:49pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225 "2018-07-09T18:49:34Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 9, 2018, 6:49pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/1 "2018-07-09T18:49:34Z")

</div>

Hi Team,

I am trying to install elasticsearch on Ubuntu 16.04 through ks.cfg but somehow this is not going, can someone please have a look at the error and confirm what could be th issue?

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/d/ddc341af7d0e6ec6b9c395913f993b283e2f52a8.png)

---

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 9, 2018, 7:01pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/2 "2018-07-09T19:01:02Z")

</div>

I even tried installing manually and that didnt happen. Is anything broke on Ubuntu?

---

<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: [July 10, 2018, 2:46am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/3 "2018-07-10T02:46:43Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them.

---

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 10, 2018, 3:12am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/4 "2018-07-10T03:12:48Z")

</div>

Oh I thought that pictures can directly be uploaded using the picture upload option.  
BTW can someone please confirm if the issue is with official elastic repo?

---

<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: [July 10, 2018, 4:01am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/5 "2018-07-10T04:01:06Z")

</div>

> [@Blason](#):
>
> Oh I thought that pictures can directly be uploaded using the picture upload option.

You can upload pictures, but if it's text (eg logs) then it's better to paste that directly in and then format as code. Otherwise it's very hard to read.

> [@Blason](#):
>
> BTW can someone please confirm if the issue is with official elastic repo?

Please post the text of the output, as mentioned.

---

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 10, 2018, 8:29am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/6 "2018-07-10T08:29:09Z")

</div>

Hello,

Here is the error I am consistently getting while installing elasticsearch on Ubuntu 16.04

Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
The following NEW packages will be installed:  
elasticsearch  
0 upgraded, 1 newly installed, 0 to remove and 93 not upgraded.  
1 not fully installed or removed.  
Need to get 0 B/91.4 MB of archives.  
After this operation, 143 MB of additional disk space will be used.  
(Reading database ... 178253 files and directories currently installed.)  
Preparing to unpack .../elasticsearch\_6.3.1\_all.deb ...  
dpkg: error processing archive /var/cache/apt/archives/elasticsearch\_6.3.1\_all.d eb (--unpack):  
subprocess new pre-installation script returned error exit status 1  
Errors were encountered while processing:  
/var/cache/apt/archives/elasticsearch\_6.3.1\_all.deb  
E: Sub-process /usr/bin/dpkg returned an error code (1)

---

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 10, 2018, 8:35am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/7 "2018-07-10T08:35:43Z")

</div>

Even manual installation fails as well

root@xxxxxx:/opt# dpkg -i elasticsearch-6.3.1.deb  
(Reading database ... 178253 files and directories currently installed.)  
Preparing to unpack elasticsearch-6.3.1.deb ...  
dpkg: error processing archive elasticsearch-6.3.1.deb (--install):  
subprocess new pre-installation script returned error exit status 1  
Errors were encountered while processing:  
elasticsearch-6.3.1.deb

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [July 10, 2018, 9:34am UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/8 "2018-07-10T09:34:19Z")

</div>

It looks like you're trying to install Elasticsearch without first installing Java.

You need to explicitly install a supported JVM before you attempt to install Elasticsearch.

---

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 10, 2018, 12:29pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/9 "2018-07-10T12:29:09Z")

</div>

hmmm..when was that changed? It wasnt that before!! I could install elasticsearch before java.

Any way let me try doing that!

---

<div class="post-metadata">

### Author: ![Blason](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/blason/32/42284_2.png) [@Blason](https://discuss.elastic.co/u/Blason)
#### Post date: [July 14, 2018, 1:52pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/10 "2018-07-14T13:52:49Z")

</div>

That seems to have resolved my issue. Thanks for the update.

---

<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: [August 11, 2018, 1:53pm UTC](https://discuss.elastic.co/t/unable-to-install-elasticsearch-on-ubuntu-16-04/139225/11 "2018-08-11T13:53:07Z")

</div>

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