# Opendistroforelasticsearch-1.6.0.rpm fails to install if not connected to internet

**URL:** <https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551>\
**Category:** Build\
**Created:** [April 9, 2020, 5:55am UTC](https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551 "2020-04-09T05:55:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henrik](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@Henrik](https://forum.opensearch.org/u/Henrik)\
**Post date:** [April 9, 2020, 5:55am UTC](https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551/1 "2020-04-09T05:55:55Z")

</div>

When trying to install the rpm-based version offline, (with the repositorys synchronized from internet), it will fail to grab the /usr/lib/libKNNIndexV1\_7\_3\_6.so from internet.

The %preinstall for opendistroforelasticsearch-1.6.0.rpm is like:

preinstall scriptlet (using /bin/sh):  
RPM\_ARCH=noarch  
RPM\_OS=linux  
RPM\_PACKAGE\_NAME=opendistroforelasticsearch  
RPM\_PACKAGE\_VERSION=1.6.0  
RPM\_PACKAGE\_RELEASE=1

echo “Fetching kNN library”  
FILE=/usr/lib/libKNNIndexV1\_7\_3\_6.so  
if [-f “$FILE”]  
then  
echo “$FILE exist: removing $FILE”  
sudo rm $FILE  
fi  
FILE=/libKNNIndexV1\_7\_3\_6.zip  
if [-f “$FILE”]  
then  
echo “$FILE exist: removing $FILE”  
sudo rm $FILE  
fi  
wget [https://d3g5vo6xdbdb9a.cloudfront.net/downloads/k-NN-lib/libKNNIndexV1\_7\_3\_6.zip](https://d3g5vo6xdbdb9a.cloudfront.net/downloads/k-NN-lib/libKNNIndexV1_7_3_6.zip)   
&& unzip libKNNIndexV1\_7\_3\_6.zip   
&& mv libKNNIndexV1\_7\_3\_6.so /usr/lib   
&& rm libKNNIndexV1\_7\_3\_6.zip

This behaivour will not work if not connected to Internet… ☹

Why not put the file in the package itself, license issues?

Otherwise I think that I should be able to put the file in the local filesystem before installing the rpm.  
(Maybe something like below. Have not tested it, but it should work…

if $(wget [https://d3g5vo6xdbdb9a.cloudfront.net/downloads/k-NN-lib/libKNNIndexV1\_7\_3\_6.zip](https://d3g5vo6xdbdb9a.cloudfront.net/downloads/k-NN-lib/libKNNIndexV1_7_3_6.zip) 2\>/dev/null) ; then  
unzip libKNNIndexV1\_7\_3\_6.zip   
&& mv libKNNIndexV1\_7\_3\_6.so /usr/lib   
&& rm libKNNIndexV1\_7\_3\_6.zip  
else  
echo “Check for local zip-file”  
if test -r /var/tmp/libKNNIndexV1\_7\_3\_6.zip ; then  
tmp\_dir=$(mktemp -d -t libKNN-XXX)   
&& unzip -d ${tmp\_dir} /var/tmp/libKNNIndexV1\_7\_3\_6.zip   
&& sudo mv ${tmp\_dir}/libKNNIndexV1\_7\_3\_6.so /usr/lib  
test -r ${tmp\_dir} && rm -rf ${tmp\_dir}  
fi  
fi

if [-r “/var/tmp/libKNNIndexV1\_7\_3\_6.zip”] ; then  
unzip /var/tmp/libKNNIndexV1\_7\_3\_6.zip && mv libKNNIndexV1\_7\_3\_6.so /usr/lib

---

<div class="post-metadata">

**Author:** ![qube222pl](https://avatars.discourse-cdn.com/v4/letter/q/c68b51/32.png) [@qube222pl](https://forum.opensearch.org/u/qube222pl)\
**Post date:** [April 24, 2020, 5:39pm UTC](https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551/2 "2020-04-24T17:39:59Z")

</div>

I can confirm that, if you don’t have access to the Internet, installation through yum repository is completely useless.

We are using internal repository manager as proxy ( Sonatype Nexus , but you can youse any other ) to install OpenDistro, so in this situation installation is not possible.

---

<div class="post-metadata">

**Author:** ![Henrik](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@Henrik](https://forum.opensearch.org/u/Henrik)\
**Post date:** [April 24, 2020, 6:24pm UTC](https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551/3 "2020-04-24T18:24:15Z")

</div>

Thaks for the info, but 1.4 works fine with offline installation. But I dont understa d why the library is not in the rpm instead? I am goung to see if i can rebuild it with local compilation of the library instead of downloading the library from amazon…

BR

Skickat från min iPhone

---

<div class="post-metadata">

**Author:** ![qube222pl](https://avatars.discourse-cdn.com/v4/letter/q/c68b51/32.png) [@qube222pl](https://forum.opensearch.org/u/qube222pl)\
**Post date:** [April 27, 2020, 6:41am UTC](https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551/4 "2020-04-27T06:41:14Z")

</div>

It’s a problem with version 1.6 , version 1.4 can be installed without any problems.

---

<div class="post-metadata">

**Author:** ![vamshin](https://avatars.discourse-cdn.com/v4/letter/v/c5a1d2/32.png) [@vamshin](https://forum.opensearch.org/u/vamshin)\
**Post date:** [April 29, 2020, 5:46pm UTC](https://forum.opensearch.org/t/opendistroforelasticsearch-1-6-0-rpm-fails-to-install-if-not-connected-to-internet/2551/5 "2020-04-29T17:46:11Z")

</div>

Thanks for bringing this up. We created a issue to fix this in 1.6.  
[Opendistroforelasticsearch-1.6.0.rpm fails to install if not connected to internet · Issue #120 · opendistro-for-elasticsearch/opendistro-build · GitHub](https://github.com/opendistro-for-elasticsearch/opendistro-build/issues/120).
