in reply to Re^2: libiconv wont work :(
in thread libiconv wont work :(
You have a couple of options. One would be to uninstall your CPAN module, make sure you use your distribution's package manage to install libiconv, then rebuild the CPAN modules so that they will use the OS paths for the libraries.
If you want to use the libiconv that you built yourself, then what you can do (you have to be root to do this) is to add /usr/local/lib to your /etc/ld.so.conf. If you have a Red Hat or Red Hat like system (CentOS, Fedora) then you can simply add a new file in /etc/ld.so.conf.d named anything you want (but in this case usrlocal.conf would be good)with the contents:
/usr/local/lib
Since you want this to work for your web server and Perls spawned by it (I'm guessing Apache), then what you can do is in your httpd.conf specify the environment variable to be passed on using this syntax:
SetEnv LD_LIBRARY_PATH /usr/lib:/usr/local/lib
I only list /usr/lib and /usr/local/lib, but you'll want every path to be included in there, because setting LD_LIBRARY_PATH overrides the complete value used by all programs spawned by the web server (not just Perl). Not specifying everything could lead to Big Problems for CGI executables.
|
|---|