Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing library while installing ruby-filemagic gem on Linux

I needed gem ruby-filemagic for some requirements in my project. While running bundle install its giving me this error

*** ERROR: missing required library to compile this module
*** extconf.rb failed ***

Please help me with this problem.

like image 644
user2153206 Avatar asked Mar 22 '13 18:03

user2153206


3 Answers

sudo apt-get install libmagic-dev did it for me

like image 164
Breno Salgado Avatar answered Nov 14 '22 07:11

Breno Salgado


Running brew install libmagic before gem install ruby-filemagic on OSX made my installation of ruby-filemagic successful.

like image 38
z3n Avatar answered Nov 14 '22 06:11

z3n


If you install gem ruby-filemagic on an EC2 instance, login as root and use this command

yum install file file-devel
like image 2
Châu Hồng Lĩnh Avatar answered Nov 14 '22 08:11

Châu Hồng Lĩnh