ruby-filemagic icon indicating copy to clipboard operation
ruby-filemagic copied to clipboard

Cent OS 7 - build error when gem install ruby-flemagic:checking for -lgnurx... no

Open aw3 opened this issue 6 years ago • 2 comments

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

aw3 avatar Mar 03 '20 08:03 aw3

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).

blackwinter avatar Mar 03 '20 09:03 blackwinter

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.

aw3 avatar Mar 03 '20 10:03 aw3