# Debian 8 apt install issue

**URL:** <https://discuss.elastic.co/t/debian-8-apt-install-issue/139061>\
**Category:** Elasticsearch\
**Created:** [July 8, 2018, 4:09pm UTC](https://discuss.elastic.co/t/debian-8-apt-install-issue/139061 "2018-07-08T16:09:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex4](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Alex4](https://discuss.elastic.co/u/Alex4)\
**Post date:** [July 8, 2018, 4:09pm UTC](https://discuss.elastic.co/t/debian-8-apt-install-issue/139061/1 "2018-07-08T16:09:59Z")

</div>

apt-get install elasticsearch  
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 12 not upgraded.  
Need to get 91.4 MB of archives.  
After this operation, 143 MB of additional disk space will be used.  
Get:1 [https://artifacts.elastic.co/packages/6.x/apt/](https://artifacts.elastic.co/packages/6.x/apt/) stable/main elasticsearch all 6.3.1 [91.4 MB]  
Fetched 91.4 MB in 18s (5,067 kB/s)  
(Reading database ... 69941 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.deb (--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:** ![Alex4](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Alex4](https://discuss.elastic.co/u/Alex4)\
**Post date:** [July 8, 2018, 4:16pm UTC](https://discuss.elastic.co/t/debian-8-apt-install-issue/139061/2 "2018-07-08T16:16:26Z")

</div>

**FIX before install**  
echo "deb [http://http.debian.net/debian](http://http.debian.net/debian) jessie-backports main" \> /etc/apt/sources.list.d/jessie-backports.list  
sudo apt-get update  
sudo apt-get install -t jessie-backports openjdk-8-jre-headless

---

<div class="post-metadata">

**Author:** ![Alex4](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Alex4](https://discuss.elastic.co/u/Alex4)\
**Post date:** [July 8, 2018, 4:22pm UTC](https://discuss.elastic.co/t/debian-8-apt-install-issue/139061/3 "2018-07-08T16:22:33Z")

</div>

And full install on Debian 8:

wget -qO - [https://artifacts.elastic.co/GPG-KEY-elasticsearch](https://artifacts.elastic.co/GPG-KEY-elasticsearch) | sudo apt-key add -  
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.list  
echo "deb [http://http.debian.net/debian](http://http.debian.net/debian) jessie-backports main" \> /etc/apt/sources.list.d/jessie-backports.list  
sudo apt-get update  
sudo apt-get install -t jessie-backports openjdk-8-jre-headless  
apt-get install -y elasticsearch  
systemctl enable elasticsearch  
systemctl start elasticsearch

---

<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 5, 2018, 4:22pm UTC](https://discuss.elastic.co/t/debian-8-apt-install-issue/139061/4 "2018-08-05T16:22:35Z")

</div>

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