goaccess 编译失败解决办法。

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 了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值