Error while loading shared libraries

Dear all,

I’m trying to compile my code:

g++ code.cpp -g -O2 -fPIC -o code.exec -I root-config --incdir root-config --libs root-config --ldflags

and I get the following error message:

/afs/…/libexec/gcc/x86_64-unknown-linux-gnu/4.3.2/cc1plus: error while loading shared libraries: cannot open shared object file: No such file or directory

In my startup script I have:

source /afs/
setenv ROOTSYS /afs/

Any suggestion?

Thanks a lot in advance!


You should contact your node’s administrator and/or the maintainer of the g++ installation you are using.
On lxplus, I get:ldd /afs/ => (0x00007fff301df000) /$LIB/ => /lib64/ (0x00002b31a01e8000) => /afs/ (0x00002b31a03ea000) => /usr/lib64/ (0x00002b31a065b000) => /lib64/ (0x00002b31a0894000) => /lib64/ (0x00002b31a0bec000) /lib64/ (0x00002b319ffca000)