# Unable to install x-pack plugin on Ubuntu 16

**URL:** <https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615>\
**Category:** Elasticsearch\
**Created:** [June 7, 2017, 6:39pm UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615 "2017-06-07T18:39:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![skunkwerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skunkwerk/32/18890_2.png) [@skunkwerk](https://discuss.elastic.co/u/skunkwerk)\
**Post date:** [June 7, 2017, 6:39pm UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/1 "2017-06-07T18:39:52Z")

</div>

I was able to install x-pack inside Kibana just fine. But for ElasticSearch, I first got this error:

```
ubuntu@server:/usr/share/elasticsearch$ sudo bin/plugin install x-pack
Exception in thread "main" org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve config path ["/usr/share/elasticsearch/config/elasticsearch.yml"], tried file path ["/usr/share/elasticsearch/config/elasticsearch.yml"], path file ["/usr/share/elasticsearch/config"/"/usr/share/elasticsearch/config/elasticsearch.yml"], and classpath
	at org.elasticsearch.env.Environment.resolveConfig(Environment.java:291)
	at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
	at org.elasticsearch.plugins.PluginManager.main(PluginManager.java:396)

```

and used [this workaround](https://stackoverflow.com/questions/33653269/elasticsearch-plugins-failed-to-resolve-config-path-error) to print the command to the console and run it manually.

Then I tried to run the command output from "sudo bin/plugin install file:///home/ubuntu/x-pack-5.4.1.zip":

```
/usr/share/elasticsearch$ sudo /usr/lib/jvm/java-8-oracle/jre/bin/java -Xmx64m -Xms16m -Delasticsearch -Des.path.home="/usr/share/elasticsearch" -Des.default.path.conf="/usr/share/elasticsearch/config" -Des.default.config="/usr/share/elasticsearch/config/elasticsearch.yml" -cp ":/usr/share/java/lucene-facet-4.10.4.jar:/usr/share/java/lucene-memory-4.10.4.jar:/usr/share/java/lucene-queries-4.10.4.jar:/usr/share/java/jts.jar:/usr/share/java/lucene-core-4.10.4.jar:/usr/share/java/lucene-sandbox-4.10.4.jar:/usr/share/java/lucene-analyzers-smartcn-4.10.4.jar:/usr/share/java/lucene-analyzers-morfologik-4.10.4.jar:/usr/share/java/lucene-highlighter-4.10.4.jar:/usr/share/java/lucene-codecs-4.10.4.jar:/usr/share/java/elasticsearch-1.7.3.jar:/usr/share/java/lucene-benchmark-4.10.4.jar:/usr/share/java/lucene-misc-4.10.4.jar:/usr/share/java/lucene-grouping-4.10.4.jar:/usr/share/java/lucene-demo-4.10.4.jar:/usr/share/java/lucene-analyzers-phonetic-4.10.4.jar:/usr/share/java/lucene-analyzers-stempel-4.10.4.jar:/usr/share/java/lucene-analyzers-common-4.10.4.jar:/usr/share/java/groovy-all-2.x.jar:/usr/share/java/spatial4j-0.4.1.jar:/usr/share/java/lucene-expressions-4.10.4.jar:/usr/share/java/lucene-queryparser-4.10.4.jar:/usr/share/java/lucene-classification-4.10.4.jar:/usr/share/java/lucene-analyzers-kuromoji-4.10.4.jar:/usr/share/java/lucene-analyzers-uima-4.10.4.jar:/usr/share/java/sigar.jar:/usr/share/java/log4j-1.2-1.2.17.jar:/usr/share/java/apache-log4j-extras-1.2.17.jar:/usr/share/java/lucene-join-4.10.4.jar:/usr/share/java/lucene-test-framework-4.10.4.jar:/usr/share/java/lucene-suggest-4.10.4.jar:/usr/share/java/lucene-analyzers-icu-4.10.4.jar:/usr/share/java/lucene-replicator-4.10.4.jar:/usr/share/java/lucene-spatial-4.10.4.jar:/usr/share/java/jna.jar:" org.elasticsearch.plugins.PluginManager "install" "file:///home/ubuntu/x-pack-5.4.1.zip"
-> Installing file:///home/ubuntu/x-pack-5.4.1.zip...
Usage:
    -u, --url [plugin location] : Set exact URL to download the plugin from
    -i, --install [plugin name] : Downloads and installs listed plugins [*]
    -t, --timeout [duration] : Timeout setting: 30s, 1m, 1h... (infinite by default)
    -r, --remove [plugin name] : Removes listed plugins
    -l, --list : List installed plugins
    -v, --verbose : Prints verbose messages
    -s, --silent : Run in silent mode
    -h, --help : Prints this help message

 [*] Plugin name could be:
     elasticsearch/plugin/version for official elasticsearch plugins (download from download.elasticsearch.org)
     groupId/artifactId/version for community plugins (download from maven central or oss sonatype)
     username/repository for site plugins (download from github master)

Message:
   Error while installing plugin, reason: ElasticsearchIllegalArgumentException: Illegal plugin name: 

```

I get this error if I try the output of "sudo bin/plugin install x-pack":

```
-> Installing x-pack...
Trying https://github.com/null/x-pack/archive/master.zip...
Failed to install x-pack, reason: failed to download out of all 
possible locations..., use --verbose to get detailed information

```

---

<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:** [June 8, 2017, 12:34am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/2 "2017-06-08T00:34:35Z")

</div>

It looks like you have a very old version of Elasticsearch.

From the version of Lucene you have, my guess is that you're running Elasticsearch 1.x

X-Pack is only available for Elasticsearch 5 and newer.

---

<div class="post-metadata">

**Author:** ![EddieTurizo](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@EddieTurizo](https://discuss.elastic.co/u/EddieTurizo)\
**Post date:** [June 8, 2017, 12:36am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/3 "2017-06-08T00:36:47Z")

</div>

Try running

```
bin/elasticsearch-plugin install x-pack

```

[https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html](https://www.elastic.co/guide/en/x-pack/current/installing-xpack.html)

---

<div class="post-metadata">

**Author:** ![skunkwerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skunkwerk/32/18890_2.png) [@skunkwerk](https://discuss.elastic.co/u/skunkwerk)\
**Post date:** [June 9, 2017, 11:56pm UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/4 "2017-06-09T23:56:52Z")

</div>

Hi Tim,

Thanks for your note.  
I installed the latest version of elasticsearch from the website, so I don't think it's version 1.x.

Should I just try the docker container here to get up and running quickly?

> **[deviantony/docker-elk](https://github.com/deviantony/docker-elk/tree/x-pack)**
>
> docker-elk - The ELK stack powered by Docker and Compose.

thanks,  
imran

---

<div class="post-metadata">

**Author:** ![skunkwerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/skunkwerk/32/18890_2.png) [@skunkwerk](https://discuss.elastic.co/u/skunkwerk)\
**Post date:** [June 10, 2017, 12:00am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/5 "2017-06-10T00:00:39Z")

</div>

Hey Eddie,

I don't have the elasticsearch-plugin program - I just have 'plugin' in my elasticsearch/bin folder.  
Am I not running the right version?

thanks

---

<div class="post-metadata">

**Author:** ![EddieTurizo](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@EddieTurizo](https://discuss.elastic.co/u/EddieTurizo)\
**Post date:** [June 10, 2017, 1:14am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/6 "2017-06-10T01:14:19Z")

</div>

@skunkwerk

Tim is correct. It looks like you're running Elasticsearch 1.x. It looks like during the 1.x days there was a shell script called plugin and in the 5.x days there is shell script called elasticsearch-plugin. See the screenshot below which shows a directory listing of the elasticsearch bin directory for 1.7.3 and 5.4.1. That should explain why you do not have elasticsearch-plugin.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/b/a/bacb1661d9dc9a1b14b7014c4e4e92cc63126d48.png)

---

<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:** [June 10, 2017, 1:44am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/7 "2017-06-10T01:44:30Z")

</div>

> [@skunkwerk](#):
>
> Should I just try the docker container here to get up and running quickly?

That's a reasonable option, but I'd recommend that you use the official docker image:

> **[Install Elasticsearch with Docker | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html)**

---

<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:** [July 8, 2017, 1:45am UTC](https://discuss.elastic.co/t/unable-to-install-x-pack-plugin-on-ubuntu-16/88615/8 "2017-07-08T01:45:17Z")

</div>

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