Debian 8 apt install issue

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/ 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)

FIX before install
echo "deb 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

And full install on Debian 8:

wget -qO - 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 stable main" | sudo tee -a /etc/apt/sources.list.d/elastic.list
echo "deb 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

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