LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-09-2009, 04:54 AM   #1
malli42108
Member
 
Registered: Jul 2009
Posts: 37

Rep: Reputation: 15
Question how to include the path of exe in the ld library path?


hi
I am facing the following error while running SplitOff.exe in machine 172.24.130.245 :
Error :
ld.so.1: SplitOff.exe: fatal: libstdc++.so.2.10.0: open failed: No such file or directory.This file is avilabe in ap/local/lib path.
how to include the path of exe in the ld library path [only System admin has permission]
 
Old 07-09-2009, 06:40 AM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware
Posts: 572

Rep: Reputation: 154Reputation: 154
add this line to your login script; /etc/profile

export PATH=$PATH:/ap/local/lib

If this does not work send us the result of

# set

and let us know the distribution you are using.

Chris

Last edited by ChrisAbela; 07-09-2009 at 06:45 AM.
 
Old 07-09-2009, 07:15 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
You can just do this command in the terminal
( before the <app> command, same terminal ) :

export LD_LIBRARY_PATH=/home/"username"/ap/local/lib:/usr/lib:/lib

Regarding ap/local/lib , please use actual path.
.....

Last edited by knudfl; 07-09-2009 at 07:16 AM.
 
Old 07-09-2009, 10:29 AM   #4
nanoo
LQ Newbie
 
Registered: Jul 2009
Posts: 19

Rep: Reputation: 1
LD_LIBRARY_PATH is archaism. It is slow and has some issue with security.
The solution is: add absolute path to your libs to one of /etc/ld.so.conf.d/*.conf file or create /etc/ld.so.conf.d/boo.conf and add one in it. Say ldconfig after that.

Last edited by nanoo; 07-09-2009 at 10:30 AM.
 
Old 07-10-2009, 12:13 AM   #5
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by knudfl View Post
You can just do this command in the terminal
( before the <app> command, same terminal ) :

export LD_LIBRARY_PATH=/home/"username"/ap/local/lib:/usr/lib:/lib

Regarding ap/local/lib , please use actual path.
.....
/usr/lib:/lib may be omitted. Them will be searched anyway if library not found in the other locations
 
Old 07-10-2009, 12:16 AM   #6
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by nanoo View Post
LD_LIBRARY_PATH is archaism. It is slow and has some issue with security.
The solution is: add absolute path to your libs to one of /etc/ld.so.conf.d/*.conf file or create /etc/ld.so.conf.d/boo.conf and add one in it. Say ldconfig after that.
If you haven't admin right on this box, or this specific library isn't compatible with a rest of system, then what alternative fo the LD_LIBRARY_PATH do you see.

And what security issue LD_LIBRARY_PATH has ?
 
Old 07-10-2009, 02:57 AM   #7
nanoo
LQ Newbie
 
Registered: Jul 2009
Posts: 19

Rep: Reputation: 1
Quote:
Originally Posted by Valery Reznic View Post
If you haven't admin right on this box, or this specific library isn't compatible with a rest of system, then what alternative fo the LD_LIBRARY_PATH do you see.

And what security issue LD_LIBRARY_PATH has ?
http://xahlee.org/UnixResource_dir/_/ldpath.html

If you have no admin rigths or library isn't compatible then at least do not set it global (~/.profile, ~/.bashrc, etc).

Another thing is if you set it like that: LD_LIBRARY_PATH=/usr/lib/xulrunner:$LD_ LIBRARY_PATH and LD...H was blank before you will get LD...H=/usr/lib/xulrunner. This is mistake.
Use LD_LIBRARY_PATH=/usr/lib/xulrunner${LD_ LIBRARY_PATH:+:$LD_LIBRARY_PATH}. This is correct.

http://www.linux.org.ru/view-message.jsp?msgid=2276232 (russian)
 
Old 07-10-2009, 11:40 PM   #8
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by nanoo View Post
http://xahlee.org/UnixResource_dir/_/ldpath.html

If you have no admin rigths or library isn't compatible then at least do not set it global (~/.profile, ~/.bashrc, etc).

Another thing is if you set it like that: LD_LIBRARY_PATH=/usr/lib/xulrunner:$LD_ LIBRARY_PATH and LD...H was blank before you will get LD...H=/usr/lib/xulrunner. This is mistake.
Use LD_LIBRARY_PATH=/usr/lib/xulrunner${LD_ LIBRARY_PATH:+:$LD_LIBRARY_PATH}. This is correct.

http://www.linux.org.ru/view-message.jsp?msgid=2276232 (russian)
I read your links and still can't see what the security issue with LD_LIBRARY_PATH.

Of course you can use it (as any other tool) wrong way and introduce security problem. You are not better off if you specify in the /etc/ld.so.conf user-writable directory.
 
Old 07-11-2009, 11:30 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,
Quote:
Originally Posted by malli42108 View Post
hi
I am facing the following error while running SplitOff.exe in machine 172.24.130.245 :
Error :
ld.so.1: SplitOff.exe: fatal: libstdc++.so.2.10.0: open failed: No such file or directory.This file is avilabe in ap/local/lib path.
how to include the path of exe in the ld library path [only System admin has permission]
Please enlighten me? What exactly are you trying to do? Please provide a little more detail of what you are attempting and why.
 
Old 07-11-2009, 04:04 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Is this version of ldstdc++ needed for just this program? libstdc++ is the standard c++ library, so I am guessing you have an issue where the program expects a different version than the system has installed.

You can precede a command with a variable assignment. You can also create a wrapper script which adds to the library path for that command. Then call the script instead of the program itself.

If you run "ldd -v /full/path/to/command", you can see which libraries are required. The verbose option includes version information.

If the system uses SELinux or AppArmor, you may find that the library path can't be changed changed via environment variables due to the secure exec mechanism:
Quote:
Originally Posted by AppArmor techdoc.pdf
3.14 Secure Execution
In this mode, the kernel passes a flag to user space. When glibc finds this flag set,
it unsets environment variables that are considered dangerous, and it prevents
the dynamic loader from loading libraries controlled by the environment. With
non-secure exec, the LD LIBRARY PATH environment variable can be used to
switch to a different set of libraries, for example. The secure exec mechanism is
not specific to AppArmor: set-user-id and set-group-id executables also use it,
as well as SELinux, which introduced this glibc feature.

Last edited by jschiwal; 07-15-2009 at 07:47 PM.
 
Old 09-17-2009, 09:21 AM   #11
malli42108
Member
 
Registered: Jul 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by knudfl View Post
You can just do this command in the terminal
( before the <app> command, same terminal ) :

export LD_LIBRARY_PATH=/home/"username"/ap/local/lib:/usr/lib:/lib

Regarding ap/local/lib , please use actual path.
.....
server has provided sudo access

$export LD_LIBRARY_PATH=/home/manantha/ap/local/lib
$ sudo /DataPathSimulation/SplitOff.exe
PCTA_IP AND PORTs ID MISSING (USING :1235 NETWORK:1236 as default)!!!
Error in opening semLockPorts file...
: No such file or directory

this will work for this user only. but for all users ?

$ sudo /DataPathSimulation/SplitOff.exe
ld.so.1: SplitOff.exe: fatal: libstdc++.so.2.10.0: open failed: No
such file or directory
Killed
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating .exe in different path hai12345 General 12 08-16-2008 03:50 PM
Setting Ubuntu include library path cbabbage Linux - Newbie 11 10-21-2007 06:42 PM
where did my include path go aot2002 Linux - Wireless Networking 2 01-24-2004 05:02 AM
Path to include? Mazen Alzogbi Red Hat 1 11-15-2003 06:25 AM
Include and library path problem sadeer Linux - Software 1 11-07-2002 02:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration