Home | News | Documentation | Download

[Solved] libCore.so: cannot open shared object file: No such


#1

Hi everyone, I recently encountered an error that I was struggling with and have finally solved it. I’m not sure if this solution is explicitly detailed in the documentation, I’m simply posting the solution here so in case one runs into the same error the solution will be easy to find.

root.exe: error while loading shared libraries: libCore.so: cannot open shared object file: No such file or directory

The problem is that the shared libraries need to be explicitly declared. This solution is only for linux.

In order to solve this problem navigate to the /etc/ld.so.conf.d/ and make a config file with the ROOT library in it.

cd /etc/ld.so.conf.d/
vim root.conf (create new file)
put the directory of your root library in the file (/lib/root)

save the file and run ldconfig as root
sudo/su ldconfig

Note: your config file should only contain text that is a directory, mine is /lib/root

That should solve the error. In the previous directory there is a file named ld.so.conf. What this file does, as far as I can tell, is scan through the config files in the /etc/ld.so.conf.d/ directory and include the paths listed in the config files as shared directories.

Hope this helps anyone who encounters the same problem.


Error while loading shared libraries: libCore.so: wrong ELF
Problems running programs: libCore.so: No such file or directory
#2

Works for me, Thanks


#3

This problem is because the library cannot be found.

So, all you need to do is add the following line to .bashrc or .bash_profile

Then source it or restart terminal.


#5

I have this error when trying to run “Event” in the test directory.
It gets created by the make file without errors but gives the error;
./Event: error while loading shared libraries: libCore.so: cannot open shared object file: No such file or directory
when I try to run it.

I can launch root fine but I cannot create an event;

arthur|13:23:15|test$ root
   ------------------------------------------------------------
  | Welcome to ROOT 6.15/01                  https://root.cern |
  |                               (c) 1995-2018, The ROOT Team |
  | Built for linuxx8664gcc on Nov 10 2018, 00:34:11           |
  | From heads/master@v6-13-04-2147-g906aa43be0                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------


root [0] Event *bob = new Event();
ROOT_prompt_1:1:18: error: unknown type name 'Event'
Event *bob = new Event();
                 ^

The solution here doesn’t fix it (but it is quite old). Is this a problem with my installation or the way I’m trying to use it?