goaccess编译排错
最近发现一个挺好的nginx日志分析工具goaccess,打算玩一下,但是在安装过程中,发现好多依赖库缺失。
[root@localhost goaccess-1.3]# ./configure --prefix=/usr/local/goaccess1.3 --enable-utf8 --enable-geoip=legacy --with-openssl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
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 whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for libintl_dgettext in -lintl... no
checking for pthread_create in -lpthread... yes
checking whether to build with rdynamic for GNU ld... yes
checking for SSL_CTX_new in -lssl... no
configure: error: **ssl library missing**
##明显没有ssl
解决:
[root@localhost goaccess-1.3]# yum -y install openssl openssl-devel
继续安装goaccess:
[root@localhost goaccess-1.3]# ./configure --prefix=/usr/local/goaccess1.3 --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... /bin/mkdir -p
checking for gawk... gawk
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 whether NLS is requested... yes
checking for msgfmt... no
checking for gmsgfmt... :
checking for xgettext... no
checking for msgmerge... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for libintl_dgettext in -lintl... no
checking for pthread_create in -lpthread... yes
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**********
缺失GeoIP。
解决:
自行解决yum 源的问题[root@localhost goaccess-1.3]# yum install glib2 glib2-devel GeoIP-devel ncurses-devel zlib zlib-devel
继续安装goaccess:
[root@localhost goaccess-1.3]# ./configure --prefix=/usr/local/goaccess1.3 --enable-utf8 --enable-geoip=legacy --with-openssl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
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
...
...
...
Your build configuration:
Prefix : /usr/local/goaccess1.3
Package : goaccess
Version : 1.3
Compiler flags : -pthread
Linker flags : -lnsl -lncursesw -lGeoIP -lcrypto -lssl -lpthread
Dynamic buffer : no
Geolocation : GeoIP Legacy
Storage method : In-memory Hash Database (Default)
TLS/SSL : yes
Bugs : goaccess@prosoftcorp.com
解决!
剩下的就make & make install 了