I've tried so much times install GoAccess. For this reason, i create this gist to make your job easy.
Don't skip the steps:
$ sudo su
# cd /usr/local/src
# 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
$ sudo apt-get install libncursesw5-dev
$ sudo su
# cd /usr/local/src
# wget https://tar.goaccess.io/goaccess-1.4.5.tar.gz
# tar -xzvf goaccess-1.4.5.tar.gz
# cd goaccess-1.4.5/
# ./configure --enable-utf8 --enable-geoip=legacy
# make
# make install
$ sudo nano /usr/local/etc/goaccess/goaccess.conf
time-format %H:%M:%S
date-format %d/%b/%Y
log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
----
# Save and Exit
----