Cent OS 7 - build error when gem install ruby-flemagic:checking for -lgnurx... no
em::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.4.1/gems/ruby-filemagic-0.7.2/ext/filemagic
/usr/local/rvm/rubies/ruby-2.4.1/bin/ruby -I /usr/local/rvm/rubies/ruby-2.4.1/lib/ruby/site_ruby/2.4.0 -r ./siteconf20200303-50089-1k0qtpb.rb extconf.rb checking for -lgnurx... no checking for magic_open() in -lmagic... yes checking for magic.h... no *** ERROR: missing required library to compile this module *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options
checking for magic.h... no *** ERROR: missing required library to compile this module
Please make sure you have all the header files for libmagic installed (should be provided by file-devel on CentOS 7).
Thx! yes, run yum install file-devel to fix it
The header file in devel package
I notice that the readme file has introduce
Thank you again.