473,738 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem using LD_LIBRARY_PATH in perl script

Hi!

I have a problem using the environment variable LD_LIBRARY_PATH in my
perl script. Everything works fine when I set it at the command prompt
and then runs my perl script like this:

presto1@S022203 5> echo $LD_LIBRARY_PAT H
/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql
presto1@S022203 5> ldd
/usr/perl5/5.6.1/site_perl/sun4-solaris/auto/DBD/Informix.so
libifsql.so => /SSW/informix/sdk2.50/lib/esql/libifsql.so
libifasf.so => /SSW/informix/sdk2.50/lib/libifasf.so
libifgen.so => /SSW/informix/sdk2.50/lib/esql/libifgen.so
libifos.so => /SSW/informix/sdk2.50/lib/esql/libifos.so
libifgls.so => /SSW/informix/sdk2.50/lib/esql/libifgls.so
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libm.so.1 => /usr/lib/libm.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libelf.so.1 => /usr/lib/libelf.so.1
libifglx.so => /SSW/informix/sdk2.50/lib/esql/libifglx.so
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/FJSV,GPUS/lib/libc_psr.so.1

and running

presto1@S022203 5> ./ins_rutin.pl presto db-ladd-lan06
presto1@S022203 5> echo $?
0

executes without error messages and carries out the expected
operations against the database.

On the other hand, when I have a LD_LIBRARY_PATH like

presto1@S022203 5> echo $LD_LIBRARY_PAT H
/SSW/informix9.4/lib:/SSW/informix9.4/lib/esql:/SSW/informix9.4/lib/tools

and instead adds a row setting LD_LIBRARY_PATH in the perl script

$ENV{"LD_LIBRAR Y_PATH"}="/SSW/informix/sdk2.50/lib:/SSW/informix/sdk2.50/lib/esql";

invoking the script gives this

presto1@S022203 5> ./ins_rutin.pl presto db-ladd-lan06
install_driver( Informix) failed: Can't load
'/usr/perl5/5.6.1/site_perl/sun4-sol
aris/auto/DBD/Informix/Informix.so' for module DBD::Informix: ld.so.1:
/usr/bin/
perl: fatal: libifsql.so: open failed: No such file or directory at
/usr/perl5/5
..6.1/sun4-solaris/DynaLoader.pm line 206.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where
expected
at ./ins_rutin.pl line 35

Why does this happen?

Some info:

presto1@S022203 5> perl -v

This is perl, v5.6.1 built for sun4-solaris

presto1@S022203 5> uname -a
SunOS S0222035 5.8 Generic sun4us sparc FJSV,GPUS
/Christian Eriksson
Jul 19 '05 #1
1 9259
c-*****@algonet.s e (Christian Eriksson) wrote in message news:<d0******* *************** ****@posting.go ogle.com>...
I have a problem using the environment variable LD_LIBRARY_PATH in my
perl script. Everything works fine when I set it at the command prompt
[ but if one...]
...instead adds a row setting LD_LIBRARY_PATH in the perl script Perhaps a required shared library or dll isn't installed where
expected Why does this happen?
When you set $ENV{LD_LIBRARY _PATH} do you do so before (that's
cronologically before, not lexically before) you try to load the
library? (Remember the Perl use() is compile-time).

IIRC on some platforms I think LD_LIBRARY_PATH is read from the
environment as the program loads and subsequent changes are ignored.
This is perl, v5.6.1 built for sun4-solaris


I vaguely recall Solaris is such a platform.

This newsgroup does not exist (see FAQ). Please do not start threads
here.
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4974
by: PzYon | last post by:
Hey 2gether! I'm trying to execute a PERL script on the web server when the user presses a button in an ASP.NET Web Application using Visual Basic. The most obvious solution for me seemed to be to use the 'Shell()'-command . This didn't work: Either I get an "File not found" error, or I get no error at all, but the PERL script isn't executed anyway. The strange thing is that I managed to execute a .bat file for example. Why the hell...
1
3058
by: Nathan | last post by:
This may be a basic task to some of you perl guru's, but I have a problem getting a perl script i've written, when executed by httpd, to send out an e-mail. Basically, i have a few variables passed into this script, it writes them to a a database, and then its supposed to read the "E-mail list" attached to that database entry and shoot an e-mail off to everyone in that list letting them know that there's been an update. I have what...
2
1737
by: ANarula | last post by:
I am running into a strange problem. I have perl script which reads the "APPDATA" environment variable, and does some work on that directory. When I a launch this script from Command Prompt, it works perfectly fine, however when the same script is launched from a DLL hosted in a particular Service, the script fails to read the envrionment variable. Does any one has any clue, whats going wrong ? Regards,
1
1731
by: rahulthathoo | last post by:
Hi, After i finish some amount of computation using a perl script, i need to send out an email to a receipient which can change and is known to the Perl script. Is there a way to call the email.php(the php program to send out the email) passing to it the recipient email ID, from the perl script? Rahul
1
1705
by: raghav82 | last post by:
New to perl. c++ file which needs to invoke perl file and provide input for it.how to invoke it.i also want to know setting of environment variable in windows environment using the perl script. i set a environment variable externally through control panel, but in the perl script its not getting set. one of the environment variable is set to a path and created logfile takes name from the environment variable.But its not getting so not creating...
4
1241
by: itzaps | last post by:
I am writing one perl script which will take value from an external file and then append the value to another file. The external file will be in the format like $name=value; $name1=value1; and so on. The file may contain several variables like this. My problem is how to get these variable values and append those values to another file using a perl script. Can anybody help me? I am stuck.
5
2317
by: tudorbalan | last post by:
I'm a complete beginner in Perl.In fact... I just need a perl script to upload files to server without having to use html <input type="file"> tag. I found a script...it works when I run it in cmd ...but it doesn't work in browser(other simple scripts work ). It gives me an internal server error 500. I am using xampp and perl addon for xampp. I used the files upload1.php upload1.pl upload1.html from this example: ...
2
1842
by: gwigg | last post by:
Hi, am am having a problem with extracting all the data I want using a perl script the data being in a mysql database. The script works fine until row 59101 is reached in the 1st table, anyone aware of any limitations? The database is an ip geo laction database to be found at www.hostip.info. I am using active perl, the db is on my local xp laptop thanks Guy Here is the script: #!/usr/local/bin/perl use strict; use warnings;
1
2822
by: krus | last post by:
Hi All, I am relatively new to HTML and perl scripts. I am writing a HTML page which has a form. It takes two inputs. Now I want pass these two inputs from the HTML form to the perl script. I want to use these two inputs to open specific files and diff them using the perl script. Can any one please help me? HTML: <form name="compare" action= "Diff.pl" method="post"> <table align="center"> First:<input type="text" name="first"...
0
8968
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8787
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9259
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4569
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.