您的位置:首页 > 运维架构 > Nginx

/opt/nginx/sbin/nginx: error while loading shared librari

2017-11-08 14:06 239 查看
问题:

#nginx启动报错

[root@localhost ~]# /opt/nginx/sbin/nginx 

/opt/nginx/sbin/nginx: error while loading shared libraries: libGeoIP.so.1: cannot open shared object file: No such file or directory

[root@localhost ~]# cd /opt/

[root@localhost opt]# wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
[root@localhost opt]# tar zxvf GeoIP.tar.gz

[root@localhost opt]# cd GeoIP-1.4.8/

[root@localhost GeoIP-1.4.8]# ./configure

[root@localhost GeoIP-1.4.8]# make && make install

[root@localhost GeoIP-1.4.8]# /opt/nginx/sbin/nginx -t

/opt/nginx/sbin/nginx: error while loading shared libraries: libGeoIP.so.1: cannot open shared object file: No such file or directory

[root@localhost GeoIP-1.4.8]# locate libGeoIP.so.1

/usr/local/lib/libGeoIP.so.1

/usr/local/lib/libGeoIP.so.1.4.8

[root@localhost GeoIP-1.4.8]# echo "/usr/local/lib" >> /etc/ld.so.conf

[root@localhost GeoIP-1.4.8]# ldconfig

[root@localhost GeoIP-1.4.8]# /opt/nginx/sbin/nginx -t

nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok

nginx: configuration file /opt/nginx/conf/nginx.conf test is successful
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐