Last Updated: February 25, 2016
·
1.754K
· 11449

Install geoip-c gem the hard way with geoip installed via homebrew

if you experience an error message like below while installing geoip-c gem

checking for GeoIPrecordby_ipnum() in -lGeoIP... no

you must have geoip c library installed!

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

try installing the gem like this

env LDFLAGS=-L/usr/local/Cellar/geoip/1.5.1/lib CFLAGS=-I/usr/local/Cellar/geoip/1.5.1/include gem install geoip-c