allinurl / goaccess

GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
https://goaccess.io
MIT License
18.12k stars 1.1k forks source link

Missing development files for the GeoIP library #852

Closed triffic-tang closed 7 years ago

triffic-tang commented 7 years ago

Missing development files for the GeoIP library when go to install the GoAccess, shown below: wechatimg3

allinurl commented 7 years ago

Please install the GeoIP library. Assuming you are using SUSE, you can try:

# zypper search geoip
# zypper in GeoIP libGeoIP1

or you can install from source

$ wget https://github.com/maxmind/geoip-api-c/releases/download/v1.6.11/GeoIP-1.6.11.tar.gz
$ tar -xzvf GeoIP-1.6.11.tar.gz
$ cd GeoIP-1.6.11
$ ./configure
$ make
# make install

then try installing goaccess again.

allinurl commented 7 years ago

Did it work?

triffic-tang commented 7 years ago

Yeah, thank you so much. BTW, Do you have any introduction of how does GoAccess work? Does it possible for us to know? I mean it is awesome, I do like it.

allinurl commented 7 years ago

Great!

The man page should give you all the details on how to use it. As far as how it works internally, you may want to check the code, most of the functions should have some comments.

Feel free to post a new issue if you have any additional questions about the code.

xenotropic commented 6 years ago

Ubuntu:

sudo apt install php5-geoip

To get config to work I had to also remove the --enable-geoip=legacy option that is listed on the goaccess download page.

allinurl commented 6 years ago

@xenotropic For legacy you could try sudo apt-get install libgeoip-dev and for mmdb sudo apt-get install libmaxminddb-dev

Rebolon commented 6 years ago

on Centos 6: sudo yum -y --enablerepo=epel install geoip

mipon commented 5 years ago

On a shared host, FreeBSD, not sure what the correct way to set up.

% wget https://github.com/maxmind/geoip-api-c/releases/download/v1.6.11/GeoIP-1.6.11.tar.gz
% tar -xzvf GeoIP-1.6.11.tar.gz
% ./configure --prefix=$HOME/local/
% make
% make install

This went through without errors and I see $HOME/local/bin/geoiplookup and $HOME/local/bin/geoiplookup6 created. --prefix=$HOME/local/ is required for this shared host so that each user can install own programs.

Now if I do

% wget https://tar.goaccess.io/goaccess-1.2.tar.gz
% tar -xzvf goaccess-1.2.tar.gz
% ./configure --enable-utf8 --enable-geoip=legacy --prefix=$HOME/local/

I get

...
checking whether to build with rdynamic for GNU ld... yes
checking for GeoIP_new in -lGeoIP... no
configure: error:
    *** Missing development files for the GeoIP library

Anybody know how it can be set up?

allinurl commented 5 years ago

@mipon Can you please try running:

$ autoreconf -fiv
$ ./configure --enable-utf8 --enable-geoip=legacy
$ make
# make install
mipon commented 5 years ago

Thanks for the reply. autoreconf -ifv gives an error.

% autoreconf -ifv
autoreconf-2.69: Entering directory `.'
autoreconf-2.69: configure.ac: not using Gettext
autoreconf-2.69: running: aclocal  --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/local/share/autoconf-2.69/Autom4te/FileUtils.pm line 326.
autoreconf-2.69: failed to run aclocal: No such file or directory
% ./configure --enable-utf8 --enable-geoip=legacy
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pthread_create in -lpthread... yes
checking build system type... x86_64-unknown-freebsd9.1
checking host system type... x86_64-unknown-freebsd9.1
checking whether to build with rdynamic for GNU ld... yes
checking for GeoIP_new in -lGeoIP... no
configure: error:
    *** Missing development files for the GeoIP library

Inside of /usr/local/share looks like this.

% ls /usr/local/share
ImageMagick-6.8.0       certs                   gettext                 libtool                 misc                    sgml                    xml
aclocal                 compat                  ghostscript             licenses                namazu                  skel                    zsh
applications            dict                    git-core                locale                  nls                     smartmontools
autoconf-2.69           doc                     icons                   lynx_help               pixmaps                 snmp
bash                    emacs                   icu                     maildrop                python2.7               spamassassin
canna                   examples                java                    man                     ri                      vim
% ls /usr/local/share/autoconf-2.69
Autom4te        autoconf        autoscan        config.guess    elisp-comp      m4sugar         missing
INSTALL         autom4te.cfg    autotest        config.sub      install-sh      mdate-sh
% ls /usr/local/share/autoconf-2.69/Autom4te
C4che.pm        ChannelDefs.pm  Channels.pm     Configure_ac.pm FileUtils.pm    General.pm      Getopt.pm       Request.pm      XFile.pm
% ls /usr/local/share/aclocal
argz.m4         glibc2.m4       intldir.m4      lcmessage.m4    libmcrypt.m4    longlong.m4     lt~obsolete.m4  progtest.m4     visibility.m4
codeset.m4      glibc21.m4      intlmacosx.m4   lib-ld.m4       libtool.m4      ltdl.m4         nls.m4          size_max.m4     wchar_t.m4
fcntl-o.m4      iconv.m4        intmax.m4       lib-link.m4     libxml.m4       ltoptions.m4    pkg.m4          stdint_h.m4     wint_t.m4
freetype2.m4    intdiv0.m4      inttypes-pri.m4 lib-prefix.m4   libxslt.m4      ltsugar.m4      po.m4           threadlib.m4    xsize.m4
gettext.m4      intl.m4         inttypes_h.m4   libcurl.m4      lock.m4         ltversion.m4    printf-posix.m4 uintmax_t.m4
allinurl commented 5 years ago

@mipon Is there an aclocal under autoconf-2.69/?

mipon commented 5 years ago

@allinurl

@mipon Is there an aclocal under autoconf-2.69/?

% ls -af /usr/local/share/autoconf-2.69
.               INSTALL         autoscan        config.sub      m4sugar
..              autoconf        autotest        elisp-comp      mdate-sh
Autom4te        autom4te.cfg    config.guess    install-sh      missing
allinurl commented 5 years ago

@mipon You probably need to install autotools 2.69 as well

Sergerant commented 5 years ago

I hope I didn't miss an existing answer - but I keep getting

checking for GeoIP_new in -lGeoIP... no
configure: error: 
    *** Missing development files for the GeoIP library

on Mac OS (10.13.6).

I tried brew install goaccess --with-libmaxminddb as well as downloading the source and ./configure --enable-utf8 --enable-geoip

Sergerant commented 5 years ago

Using homebrew, I uninstalled goaccess and installed it again --with-libmaxminddb and now it works.

Just left me wondering when (how?) v1.3 would be available via homebrew

allinurl commented 5 years ago

@Sergerant Please feel free to open an issue here to upgrade to v1.3. Thanks

archon810 commented 4 years ago

FYI: for OpenSUSE 15.1, I had to zypper install libGeoIP-devel.

AlexYegupov commented 3 years ago

also for ubuntu 16 worked:

sudo apt install libmaxminddb-dev