# How to install plugin with .gem file?

**URL:** <https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060>\
**Category:** Logstash\
**Created:** [March 29, 2018, 9:17am UTC](https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060 "2018-03-29T09:17:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [March 29, 2018, 9:17am UTC](https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060/1 "2018-03-29T09:17:38Z")

</div>

```
./logstash-plugin install file:///opt/ES/logstash-filter-ip2location-1.0.2.gem 
ERROR: Invalid pack for: file:///opt/ES/logstash-filter-ip2location-1.0.2.gem, reason: Invalid format, the pack must be in zip format, message: Invalid format, the pack must be in zip format
```

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 2, 2018, 9:54am UTC](https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060/2 "2018-04-02T09:54:32Z")

</div>

How did you obtain this gem file?

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 3, 2018, 12:35am UTC](https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060/3 "2018-04-03T00:35:58Z")

</div>

from [https://rubygems.org/](https://rubygems.org/)  
[https://github.com/ip2location/logstash-filter-ip2location](https://github.com/ip2location/logstash-filter-ip2location)

---

<div class="post-metadata">

**Author:** ![zqc0512](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zqc0512/32/32141_2.png) [@zqc0512](https://discuss.elastic.co/u/zqc0512)\
**Post date:** [April 3, 2018, 3:04am UTC](https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060/4 "2018-04-03T03:04:12Z")

</div>

use a machine can connect to network .  
use logstash-plugin install logstash-filter-ip2location install this  
and use logstash-plugin output this filter plugin  
slove it.  
thanks all.

---

<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:** [May 1, 2018, 3:04am UTC](https://discuss.elastic.co/t/how-to-install-plugin-with-gem-file/126060/5 "2018-05-01T03:04:20Z")

</div>

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