# Problem to install logstash using 'sudo apt install logstash'

**URL:** <https://discuss.elastic.co/t/problem-to-install-logstash-using-sudo-apt-install-logstash/177029>\
**Category:** Logstash\
**Created:** [April 16, 2019, 8:46am UTC](https://discuss.elastic.co/t/problem-to-install-logstash-using-sudo-apt-install-logstash/177029 "2019-04-16T08:46:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alextim](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@alextim](https://discuss.elastic.co/u/alextim)\
**Post date:** [April 16, 2019, 8:46am UTC](https://discuss.elastic.co/t/problem-to-install-logstash-using-sudo-apt-install-logstash/177029/1 "2019-04-16T08:46:41Z")

</div>

Hi everyone.  
I trying to install logstash (sudo apt install logstash) on my laptop with ubuntu 18.04 and having following outcome:  
Setting up logstash (1:6.7.1-1) ...  
Using provided startup.options file: /etc/logstash/startup.options  
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
WARNING: An illegal reflective access operation has occurred  
WARNING: Illegal reflective access by org.jruby.util.SecurityHelper to field java.lang.reflect.Field.modifiers  
WARNING: Please consider reporting this to the maintainers of org.jruby.util.SecurityHelper  
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations  
WARNING: All illegal access operations will be denied in a future release  
NoMethodError: undefined method `split' for nil:NilClass  
detect\_systemd at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:33  
detect\_platform at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:24  
detect at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:18  
setup\_defaults at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:153  
execute at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:119  
run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:67  
run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:114  
run at /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/clamp-0.6.5/lib/clamp/command.rb:132  
 at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:12  
systemd: invalid option -- 'I'  
chmod: cannot access '/etc/default/logstash': No such file or directory  
dpkg: error processing package logstash (--configure):  
installed logstash package post-installation script subprocess returned error exit status 1  
Errors were encountered while processing:  
logstash  
E: Sub-process /usr/bin/dpkg returned an error code (1)

elasticsearch and kibana were installed correctly.  
Java version:  
openjdk version "10.0.2" 2018-07-17  
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)  
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

Can anyone to help?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 16, 2019, 11:52am UTC](https://discuss.elastic.co/t/problem-to-install-logstash-using-sudo-apt-install-logstash/177029/2 "2019-04-16T11:52:25Z")

</div>

> [@alextim](#):
>
> illegal reflective access

Use an older version of java for the install. Java 8 works. You can run the installed product using newer versions of java.

---

<div class="post-metadata">

**Author:** ![alextim](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@alextim](https://discuss.elastic.co/u/alextim)\
**Post date:** [April 16, 2019, 3:24pm UTC](https://discuss.elastic.co/t/problem-to-install-logstash-using-sudo-apt-install-logstash/177029/3 "2019-04-16T15:24:04Z")

</div>

Thank you so much. Installed.

---

<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 14, 2019, 3:24pm UTC](https://discuss.elastic.co/t/problem-to-install-logstash-using-sudo-apt-install-logstash/177029/4 "2019-05-14T15:24:14Z")

</div>

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