Error installing ruby-filemagic

Wajeeh Ahsan
Aug 20, 2021

--

On macOS, tried to isntall ruby-filemagic and ended up with this error

ERROR:  Error installing ruby-filemagic:ERROR: Failed to build gem native extension.*** ERROR: missing required library to compile this module*** extconf.rb failed ***

It turned out that I didn’t have necessary libraries install on my mac.
Running this command prior installing the gem fixed the issue.

brew install libmagic

Then

gem install ruby-filemagic

BOOM

--

--

Wajeeh Ahsan
Wajeeh Ahsan

No responses yet