0
votes

I have been trying to run gem install listen and I saw this error below.

ERROR: Error installing listen:

ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.5.0/gems/ffi-1.11.3/ext/ffi_c /usr/bin/ruby2.5 -r ./siteconf20200106-9209-e0kdmx.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

1
sudo apt-get install ruby-dev.Tom Lord

1 Answers

1
votes

"can't find header files for ruby" explains the issue best. Make sure to install Ruby developer libraries. Depending on your OS and package manager, try

sudo apt-get install ruby-dev

or

sudo yum install ruby-dev

or

sudo apk add ruby-dev

or

xcode-select --install

Also, please check out Error while installing json gem 'mkmf.rb can't find header files for ruby' and similar proposed solutions.