I have the GeoIP lib installed in a non standard location. I am
configuring nginx like
./configure --prefix=$NGX_PATH
--with-pcre=$HOME/tarballs/pcre-8.10 --without-http_autoindex_module
--without-http_charset_module --without-http_empty_gif_module
--without-http_geo_module --without-http_ssi_module
--with-http_gzip_static_module --with-http_realip_module
--with-http_geoip_module --with-cc-opt="-I $HOME/apps/GeoIP/include"
--with-ld-opt="-L $HOME/apps/GeoIP/lib"
Nginx will configure, make and make install okay.
But when I try to start it I get the error
error while loading shared libraries: libGeoIP.so.1: cannot open
shared object file: No such file or directory
How should I get nginx with the geo-ip module to work when the GeoIP lib
is installed in a non-standard location?
Thanks
Dave
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,139261,139261#msg-139261
On Mon, Oct 11, 2010 at 06:47:22AM -0400, djeyewater wrote:
Nginx will configure, make and make install okay.
But when I try to start it I get the error
error while loading shared libraries: libGeoIP.so.1: cannot open
shared object file: No such file or directory
How should I get nginx with the geo-ip module to work when the GeoIP lib
is installed in a non-standard location?
Try
–with-ld-opt="-R $HOME/apps/GeoIP/lib -L $HOME/apps/GeoIP/lib"[/code]
–
Igor S.
http://sysoev.ru/en/
Igor S. Wrote:
Try
–with-ld-opt="-R $HOME/apps/GeoIP/lib -L
$HOME/apps/GeoIP/lib"
Unfortunately I get the following error when running configure with
that:
./configure: error: the invalid value in --with-ld-opt="-R
/home/djeyewater/apps/GeoIP/lib -L
/home/djeyewater/apps/GeoIP/lib"
Dave
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,139261,139292#msg-139292
On Mon, Oct 11, 2010 at 08:43:04AM -0400, djeyewater wrote:
/home/djeyewater/apps/GeoIP/lib -L
/home/djeyewater/apps/GeoIP/lib"[/code]
What is in objs/autoconf.err near this test ?
–
Igor S.
http://sysoev.ru/en/
Igor S. Wrote:
What is in objs/autoconf.err near this test ?
Hi Igor
objs/autoconf.err has
[code]checking for --with-ld-opt="-R /home/djeyewater/apps/GeoIP/lib -L
/home/djeyewater/apps/GeoIP/lib"
gcc: unrecognized option ‘-R’
/home/djeyewater/apps/GeoIP/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status[/code]
The gcc and ld versions installed are:
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)
GNU ld version 2.17.50.0.6-14.el5 20061020
Dave
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,139261,139368#msg-139368
On Mon, Oct 11, 2010 at 11:36:48AM -0400, djeyewater wrote:
gcc: unrecognized option ‘-R’
/home/djeyewater/apps/GeoIP/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status[/code]
The gcc and ld versions installed are:
gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)
GNU ld version 2.17.50.0.6-14.el5 20061020
Then try:
–with-ld-opt="-rpath $HOME/apps/GeoIP/lib -L $HOME/apps/GeoIP/lib"
–
Igor S.
http://sysoev.ru/en/
Igor S. Wrote:
Then try:
–with-ld-opt="-rpath $HOME/apps/GeoIP/lib -L
$HOME/apps/GeoIP/lib"
Unfortunately that’s the same (from autoconf.err):
[code]checking for --with-ld-opt="-rpath /home/djeyewater/apps/GeoIP/lib
-L /home/djeyewater/apps/GeoIP/lib"
gcc: unrecognized option ‘-rpath’
/home/djeyewater/apps/GeoIP/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status[/code]
Dave
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,139261,139436#msg-139436
On Mon, Oct 11, 2010 at 02:43:44PM -0400, djeyewater wrote:
[code]checking for --with-ld-opt="-rpath /home/djeyewater/apps/GeoIP/lib
-L /home/djeyewater/apps/GeoIP/lib"
gcc: unrecognized option ‘-rpath’
/home/djeyewater/apps/GeoIP/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status[/code]
Oh, sorry, I have just noticed that this is an gcc’s error, but not
linker’s one. Try
–with-ld-opt="-Wl,-R,$HOME/apps/GeoIP/lib -L $HOME/apps/GeoIP/lib"
or
–with-ld-opt="-Wl,-rpath,$HOME/apps/GeoIP/lib -L $HOME/apps/GeoIP/lib"
–
Igor S.
http://sysoev.ru/en/
--with-ld-opt="-Wl,-R,$HOME/apps/GeoIP/lib -L
$HOME/apps/GeoIP/lib"
worked
Thanks for the help!
Dave
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,139261,139730#msg-139730