[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Problem Running Application with Alias



-----Original Message-----
From: Petter Adsen [mailto:petter@synth.no] 
Sent: Saturday, May 23, 2015 9:47 AM
To: debian-user@lists.debian.org
Subject: Re: Problem Running Application with Alias

On Sat, 23 May 2015 09:36:31 -0400
"Sephen P. Molnar" <s.molnar@sbcglobal.net> wrote:

> VI am running Wheezy (v-7.8.0)  in a VM and have encountered rather a 
> strange problem .with an application, MOPAC (a well established 
> quantum chemistry program).
> 
> The application is installed in /opt/mopac (required by the
> executable) and, in order to execute the program the following is an 
> entry in the user .bashrc:
> 
> LD_LIBRARY_PATH="/opt/mopac/MOPAC2012.exe:$LD_LIBRARY_PATH"

This is an obvious thing that jumps out at me, this line should be:

LD_LIBRARY_PATH="/opt/mopac:$LD_LIBRARY_PATH"

as LD_LIBRARY_PATH is meant to contain directories where shared libraries
can be found, not an executable binary.

In this case, I expect that the shared libraries will not be found, since
the loader will look for them in a _directory named_ "MOPAC2012.exe", not
"/opt/mopac".

> export LD_LIBRARY_PATH
> alias mopac='/opt/mopac/MOPAC2012.exe'
> 
> The permissions for /opt/mopac are:  drwxrwxrwx
> 
> 
> (I should note at this point that this works flawlessly in my 
> production machine.)

Maybe there are copies of the libraries in another directory that the loader
searches, or "/opt/mopac" is listed in "/etc/ld.so.conf".

> comp@inga:~$ /opt/mopac/MOPAC2012.exe
> /opt/mopac/MOPAC2012.exe: error while loading shared libraries: 
> libiomp5.so: can
> not open shared object file: No such file or directory
> 
> The workaround is to copy the argument to /opt/mopac, run the 
> executable for the calculation, and then transfer the results to the 
> working directory.
> 
> This is most inconvenient and I would really appreciate a solution to 
> the problem.

Try fixing the line that sets LD_LIBRARY_PATH, or adding "/opt/mopac"
to "/etc/ld.so.conf" and run ldconfig to update the cache.

Petter

--
"I'm ionized"
"Are you sure?"
"I'm positive."


Well, that was a red-faced forehead slapper.  The solution, or rather the
problem, was staring me in the face and I faled to comprehend.

Thanks very much for your reply!


Stephen P. Molnar, Ph.D.                                    Life is a fuzzy
set
Foundation for Chemistry                                   Stochastic and
multivariate
www.FoundationForChemistry.com
(614)312-7528 (c)
Skype:  smolnar1




Reply to: