Running program in terminal question. Please help

I am so confused by this problem because I know it shouldn't exist. I have installed a program called GEANT4 and spent the past 2 weeks trying to get it to run. Yesterday it did run and today it does not, and I couldn't understand how this is possible.

Everything Linux 1798 This topic was started by ,


data/avatar/default/avatar13.webp

10 Posts
Location -
Joined 2003-06-26
I am so confused by this problem because I know it shouldn't exist. I have installed a program called GEANT4 and spent the past 2 weeks trying to get it to run. Yesterday it did run and today it does not, and I couldn't understand how this is possible. When I would execute an example, I would receive this error:
[root@localhost N01]# /root/bin/Linux-g++/exampleN01
/root/bin/Linux-g++/exampleN01: error while loading shared libraries: libG4persistency.so: cannot open shared object file: No such file or directory
 
A friend helped guide me to solve this problem. He told me to enter /root and use emacs to edit .bashrc by adding lines:
LD_LIBRARY_PATH=/root/geant4/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
 
This helped because it told the computer where to find the library. Now when I would execute an example the program ran perfectly. However, I closed the terminal and re-opened it to run into the same problem. The libG4persistency.so file cannot be found, and I thought the problem was fixed so now I don't know what to do and I cannot reach my friend for 2 weeks. Can anyone please provide assistance?

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar25.webp

11 Posts
Location -
Joined 2003-06-24
Are you trying to run the program as root? The only environment you changed was root's. You also have a .bashrc in your user's home directory that you can use that trick with (if the user has permission to run the geant4 script, of course).
 
If this is not the problem. Have you tried running ldconfig, then running the script? Failing that, try adding
 
/root/geant4/lib
 
to the end of your /etc/ld.so.conf file and then run ldconfig then see if you can run the script.

data/avatar/default/avatar13.webp

10 Posts
Location -
Joined 2003-06-26
OP
Thank you for your suggestion but the error remained, I am still stumped.

data/avatar/default/avatar25.webp

11 Posts
Location -
Joined 2003-06-24
If that library is in /root, then you'll only be able to run the script as root. Are you running it as root?