Ошибка geoiplookup: not found в FreeBSD

FreeBSD убираем ошибку geoiplookup: not found, мы понимаем что какой то скрипт вызывает утилиту /usr/local/bin/geoiplookup осталось найти порт и установить его.

Ошибки в логе apache

/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found
/usr/local/bin/geoiplookup: not found

Ищем порт

cd /usr/ports ; make search name=geoip

serv# cd /usr/ports ; make search name=geoip
Port: bind94-geoip-9.4.4.ESV.4
Path: /usr/ports/dns/bind94-geoip
Info: The BIND DNS suite with updated DNSSEC and threads
Maint: dougb@FreeBSD.org
B-deps: GeoIP-1.4.7
R-deps: GeoIP-1.4.7
WWW: http://www.caraytech.com/geodns/

Port: GeoIP-1.4.7
Path: /usr/ports/net/GeoIP
Info: Find the country that any IP address or hostname originates from
Maint: dhn@FreeBSD.org
B-deps: libtool-2.4
R-deps:
WWW: http://www.maxmind.com/geoip/

Port: pear-Net_GeoIP-1.0.0.r1
Path: /usr/ports/net/pear-Net_GeoIP
Info: Library to perform geo-location lookups of IP addresses.
Maint: miwi@FreeBSD.org
B-deps: libiconv-1.13.1_1 libxml2-2.7.8_1 pcre-8.12 pear-1.9.2 pear-Cache-1.5.6 pear-HTTP_Request-1.4.4 pear-Net_Socket-1.0.10 pear-Net_URL-1.0.15 pear-XML_Parser-1.3.4 pear-XML_Serializer-0.20.2 pear-XML_Util-1.2.1 php5-5.3.6 php5-xml-5.3.6 pkg-config-0.25_1
R-deps: libiconv-1.13.1_1 libxml2-2.7.8_1 pcre-8.12 pear-1.9.2 pear-Cache-1.5.6 pear-HTTP_Request-1.4.4 pear-Net_Socket-1.0.10 pear-Net_URL-1.0.15 pear-XML_Parser-1.3.4 pear-XML_Serializer-0.20.2 pear-XML_Util-1.2.1 php5-5.3.6 php5-xml-5.3.6 pkg-config-0.25_1
WWW: http://pear.php.net/package/Net_GeoIP/

Port: pecl-geoip-1.0.7
Path: /usr/ports/net/pecl-geoip
Info: Map IP address to geographic places
Maint: clsung@FreeBSD.org
B-deps: GeoIP-1.4.7 autoconf-2.68 autoconf-wrapper-20101119 libiconv-1.13.1_1 libxml2-2.7.8_1 m4-1.4.16,1 pcre-8.12 perl-5.10.1_3 php5-5.3.6 pkg-config-0.25_1
R-deps: GeoIP-1.4.7 libiconv-1.13.1_1 libxml2-2.7.8_1 pcre-8.12 php5-5.3.6 pkg-config-0.25_1
WWW: http://www.maxmind.com/

Port: py27-GeoIP-1.2.4
Path: /usr/ports/net/py-GeoIP
Info: Mapping of IP addresses/hostnames to country names in Python
Maint: stefan@FreeBSD.org
B-deps: GeoIP-1.4.7 python27-2.7.1_1
R-deps: GeoIP-1.4.7 python27-2.7.1_1
WWW: http://www.maxmind.com/app/python

Port: ruby18-net-geoip-0.07
Path: /usr/ports/net/ruby-net-geoip
Info: A Ruby extension that wraps around libGeoIP
Maint: f3cun3c02@sneakemail.com
B-deps: GeoIP-1.4.7 libiconv-1.13.1_1 ruby-1.8.7.302,1
R-deps: GeoIP-1.4.7 libiconv-1.13.1_1 ruby-1.8.7.302,1
WWW: http://www.maxmind.com/app/geolitecountry/

Port: rubygem-geoip-1.0.0
Path: /usr/ports/net/rubygem-geoip
Info: Geoip implementation for rubygems
Maint: ruby@FreeBSD.org
B-deps: ruby-1.8.7.302,1 ruby18-gems-1.7.2
R-deps: GeoIP-1.4.7 ruby-1.8.7.302,1 ruby18-gems-1.7.2
WWW: https://github.com/cjheath/geoip

Port: webalizer-geoip-2.23.5
Path: /usr/ports/www/geolizer
Info: A web server log file analysis program
Maint: dinoex@FreeBSD.org
B-deps: GeoIP-1.4.7 expat-2.0.1_1 fontconfig-2.8.0,1 freetype2-2.4.4 gd-2.0.35_7,1 jpeg-8_3 pkg-config-0.25_1 png-1.4.5
R-deps: GeoIP-1.4.7 expat-2.0.1_1 fontconfig-2.8.0,1 freetype2-2.4.4 gd-2.0.35_7,1 jpeg-8_3 pkg-config-0.25_1 png-1.4.5
WWW: http://www.mrunix.net/webalizer/

Port: lighttpd-mod_geoip-1.4.28_4
Path: /usr/ports/www/lighttpd-mod_geoip
Info: GeoIP module for lighttpd
Maint: mm@FreeBSD.org
B-deps: GeoIP-1.4.7 autoconf-2.68 autoconf-wrapper-20101119 automake-1.11.1 automake-wrapper-20101119 libtool-2.4 lighttpd-1.4.28_4 m4-1.4.16,1 pcre-8.12 perl-5.10.1_3 pkg-config-0.25_1
R-deps: GeoIP-1.4.7 lighttpd-1.4.28_4 pcre-8.12
WWW: http://redmine.lighttpd.net/wiki/1/Docs:ModGeoip

Port: ap13-mod_geoip-1.3.4_1
Path: /usr/ports/www/mod_geoip
Info: An Apache module that provides the country code of the client's IP
Maint: yarodin@gmail.com
B-deps: GeoIP-1.4.7 apache-1.3.42 expat-2.0.1_1 perl-5.10.1_3
R-deps: GeoIP-1.4.7 apache-1.3.42 expat-2.0.1_1 perl-5.10.1_3
WWW: http://www.maxmind.com/app/mod_geoip

Port: ap20-mod_geoip2-1.2.5
Path: /usr/ports/www/mod_geoip2
Info: An Apache module that provides the country code of the client's IP
Maint: jau@iki.fi
B-deps: GeoIP-1.4.7 apache-2.0.64 apr-0.9.19.0.9.19 db42-4.2.52_5 expat-2.0.1_1 gdbm-1.8.3_3 libiconv-1.13.1_1 pcre-8.12 perl-5.10.1_3
R-deps: GeoIP-1.4.7 apache-2.0.64 apr-0.9.19.0.9.19 db42-4.2.52_5 expat-2.0.1_1 gdbm-1.8.3_3 libiconv-1.13.1_1 pcre-8.12 perl-5.10.1_3
WWW: http://www.maxmind.com/app/mod_geoip

То что нам нужно ap20-mod_geoip2-1.2.5

Читайте также:  Эффективное руководство по использованию Latex для создания профессиональных документов

устанавливаем порт /usr/ports/www/mod_geoip2

cd /usr/ports/www/mod_geoip2; make install clean

serv# cd /usr/ports/www/mod_geoip2
serv# make install clean
===> Vulnerability check disabled, database not found
===> License check disabled, port has not defined LICENSE
=> mod_geoip2_1.2.5.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://geolite.maxmind.com/download/geoip/api/mod_geoip2/mod_geoip2_1.2.5.tar.gz
mod_geoip2_1.2.5.tar.gz 100% of 11 kB 142 kBps
===> Extracting for ap22-mod_geoip2-1.2.5
=> SHA256 Checksum OK for mod_geoip2_1.2.5.tar.gz.
===> Patching for ap22-mod_geoip2-1.2.5
===> ap22-mod_geoip2-1.2.5 depends on package: GeoIP>=1.4.4 - found
===> ap22-mod_geoip2-1.2.5 depends on file: /usr/local/sbin/apxs - found
===> Configuring for ap22-mod_geoip2-1.2.5
===> Building for ap22-mod_geoip2-1.2.5
===> Generating apache plist
/usr/local/share/apr/build-1/libtool --silent --mode=compile cc -prefer-pic -O2 -pipe -I/usr/include -fno-strict-aliasing -g -I/usr/local/include -I/usr/local/include/apache22 -I/usr/local/include/apr-1 -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/local/include/db42 -I/usr/local/include -c -o mod_geoip.lo mod_geoip.c && touch mod_geoip.slo
/usr/local/share/apr/build-1/libtool --silent --mode=link cc -o mod_geoip.la -L/usr/local/lib -lGeoIP -rpath /usr/local/libexec/apache22 -module -avoid-version mod_geoip.lo
===> Installing for ap22-mod_geoip2-1.2.5
===> ap22-mod_geoip2-1.2.5 depends on package: GeoIP>=1.4.4 - found
===> ap22-mod_geoip2-1.2.5 depends on file: /usr/local/sbin/apxs - found
===> Generating temporary packing list
===> Checking if www/mod_geoip2 already installed
/usr/local/share/apache22/build/instdso.sh SH_LIBTOOL='/usr/local/share/apr/build-1/libtool' /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/mod_geoip.la /usr/local/libexec/apache22
/usr/local/share/apr/build-1/libtool --mode=install cp /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/mod_geoip.la /usr/local/libexec/apache22/
libtool: install: cp /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/.libs/mod_geoip.so /usr/local/libexec/apache22/mod_geoip.so
libtool: install: cp /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/.libs/mod_geoip.lai /usr/local/libexec/apache22/mod_geoip.la
libtool: install: cp /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/.libs/mod_geoip.a /usr/local/libexec/apache22/mod_geoip.a
libtool: install: chmod 644 /usr/local/libexec/apache22/mod_geoip.a
libtool: install: ranlib /usr/local/libexec/apache22/mod_geoip.a
chmod 755 /usr/local/libexec/apache22/mod_geoip.so
[preparing module `geoip' in /usr/local/etc/apache22/httpd.conf]
/bin/mkdir -p /usr/local/share/doc/mod_geoip2
install -o root -g wheel -m 444 /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/Changes /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/INSTALL /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/README /usr/ports/www/mod_geoip2/work/mod_geoip2_1.2.5/README.php /usr/local/share/doc/mod_geoip2
*******************************************************************************
Please edit your apache.conf or httpd.conf to enable and setup this module.

You can always refer to the useful documents held in:
/usr/local/share/doc/mod_geoip2

When it is done, do the following to apply the modifications:

apachectl configtest (and correct any errors reported)
apachectl restart
*******************************************************************************
===> Registering installation for ap22-mod_geoip2-1.2.5
===> Cleaning for ap22-mod_geoip2-1.2.5
serv#
serv# /usr/local/bin/geoiplookup
Usage: geoiplookup [-d custom_dir] [-f custom_file] [-v] [-i] <ipaddress|hostname>

Установка geoip на freebsd завершена.

Читайте также:  12 полезных примеров использования команды in в Linux для повседневной работы