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

Re: Problem Running Application with Alias



On Sat, 23 May 2015 14:28:54 -0600
Bob Proulx <bob@proulx.com> wrote:

> Petter Adsen wrote:
> > On Sat, 23 May 2015 09:36:31 -0400
> > > 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.
> 
> I have a small comment concerning the syntax.  I am sure you are
> correct about the problem.  But both of those assume that
> $LD_LIBRARY_PATH already exists in the environment.  If it does then
> fine.  Let me use "foo" as a stand-in for the explanation.
> 
>   $ foo=/bar
>   $ foo=/opt/somepath:$foo
>   $ echo "$foo"
>   /opt/somepath:/bar
> 
> But if it does not exist then it leaves the environment variable with
> a hanging colon at the end.

Oooops, sorry.

Another thing I should have mentioned last night, but I was getting
really tired:

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

> The permissions for /opt/mopac are:  drwxrwxrwx
                                               ^
In this case, adding /opt/mopac to /etc/ld.so.conf without first fixing
up the permissions is probably not a good idea either.

The shell expansion I must admit I didn't even think about.

Thanks, Bob.

Petter

PS: What _are_ the security implications of having a PATH set to
"/foo/bar:"?

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

Attachment: pgpusXZHu4rcW.pgp
Description: OpenPGP digital signature


Reply to: