Different versions of Ubuntu ship with different versions of Java.
Trusty had 7, Xenial has 8, and so on. This causes problems when we
hardcode a versioned package name into our dep lists as that version may
not exist everywhere. Thankfully Ubuntu provides a default-jre-headless
package that we can use instead that maps properly onto whatever java
version is correct.
Change-Id: I4e5da215c8f7aa426494686d5043995ce5d3c3af
... | ... |
@@ -2,6 +2,7 @@ bc |
2 | 2 |
bridge-utils |
3 | 3 |
bsdmainutils |
4 | 4 |
curl |
5 |
+default-jre-headless # NOPRIME |
|
5 | 6 |
g++ |
6 | 7 |
gcc |
7 | 8 |
gettext # used for compiling message catalogs |
... | ... |
@@ -17,7 +18,6 @@ libxml2-dev # lxml |
17 | 17 |
libxslt1-dev # lxml |
18 | 18 |
libyaml-dev |
19 | 19 |
lsof # useful when debugging |
20 |
-openjdk-7-jre-headless # NOPRIME |
|
21 | 20 |
openssh-server |
22 | 21 |
openssl |
23 | 22 |
pkg-config |
... | ... |
@@ -83,7 +83,7 @@ function install_elasticsearch { |
83 | 83 |
return |
84 | 84 |
fi |
85 | 85 |
if is_ubuntu; then |
86 |
- is_package_installed openjdk-7-jre-headless || install_package openjdk-7-jre-headless |
|
86 |
+ is_package_installed default-jre-headless || install_package default-jre-headless |
|
87 | 87 |
|
88 | 88 |
sudo dpkg -i ${FILES}/elasticsearch-${ELASTICSEARCH_VERSION}.deb |
89 | 89 |
sudo update-rc.d elasticsearch defaults 95 10 |