Nginx:error while loading shared libraries:libgeoip.so.1

Source: Internet
Author: User
Tags geoip maxmind

wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz


# tar XZVF GeoIP.tar.gz

# CD GeoIP-1.4.8

#./configure

# Make && make install


# nginx-t
Nginx:error while loading shared libraries:libgeoip.so.1:cannot open Shared object file:no such file or directory


# Locate Libgeoip.so.1
-bash:locate:command not found

Yum-y Install Mlocate
-------------------------------


# Locate Libgeoip.so.1
Locate:can not stat () '/var/lib/mlocate/mlocate.db ': No such file or directory

UpdateDB
-------------------------------


# Locate Libgeoip.so.1
/root/geoip-1.4.8/libgeoip/.libs/libgeoip.so.1
/root/geoip-1.4.8/libgeoip/.libs/libgeoip.so.1.4.8
/usr/local/lib/libgeoip.so.1
/usr/local/lib/libgeoip.so.1.4.8


# echo "/usr/local/lib" >>/etc/ld.so.conf
# Ldconfig


# nginx-t
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful



This article is from the "Square Hill" blog, please be sure to keep this source http://63638790.blog.51cto.com/513514/1650407

Nginx:error while loading shared libraries:libgeoip.so.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.