blackwinter / ruby-filemagic

Ruby bindings to the magic(4) library, revised.
https://blackwinter.github.iom/ruby-filemagic
146 stars 34 forks source link

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

Closed aw3 closed 4 years ago

aw3 commented 4 years ago

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

blackwinter commented 4 years ago

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

aw3 commented 4 years ago

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.