LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cannot find a library file (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-find-a-library-file-4175499431/)

jyunker 03-25-2014 01:23 PM

cannot find a library file
 
In the output shown below I am trying to find libelf.so.0

Code:

[root@james aide-0.15.1]# locate  libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0.8.13
/home/james/.local/share/Trash/files/hpctoolkit-externals-install.2/libelf/lib/libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-externals-install.2/libelf/lib/libelf.so.0.8.13
/home/james/.local/share/Trash/files/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0.8.13
/home/james/Desktop/hourly.0/localhost/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0
/home/james/Desktop/hourly.0/localhost/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0.8.13
/home/james/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0
/home/james/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0.8.13
/home/james/Desktop/tar_extract/lib64/libelf.so.0
/home/james/Desktop/tar_extract/lib64/libelf.so.0.8.13
/home/james/Desktop2/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0
/home/james/Desktop2/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0.8.13
/home/james/Desktop2/Desktop/tar_extract/lib64/libelf.so.0
/home/james/Desktop2/Desktop/tar_extract/lib64/libelf.so.0.8.13
[root@james aide-0.15.1]# cd /usr/lib64/
[root@james lib64]# ls -al  libelf.so.0
-rwx------ 1 root root 431754 Mar 25 14:14 libelf.so.0


I am trying to find libelf.so.0. The locate command finds it in many place, but not in

/usr/lib64/

where I put it earlier today.

Why is it not finding it in /usr/lib64/ ?

R,

jyunker

PS.


please note the use/lib64/ is in my LD_LIBARY_PATH.

Code:

echo $LD_LIBRARY_PATH
/usr/lib64/:/lib64/:
[root@james lib64]# locate  libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0.8.13
/home/james/.local/share/Trash/files/hpctoolkit-externals-install.2/libelf/lib/libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-externals-install.2/libelf/lib/libelf.so.0.8.13
/home/james/.local/share/Trash/files/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0
/home/james/.local/share/Trash/files/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0.8.13
/home/james/Desktop/hourly.0/localhost/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0
/home/james/Desktop/hourly.0/localhost/home/james/.local/share/Trash/files/hpctoolkit-externals-install/libelf/lib/libelf.so.0.8.13
/home/james/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0
/home/james/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0.8.13
/home/james/Desktop/tar_extract/lib64/libelf.so.0
/home/james/Desktop/tar_extract/lib64/libelf.so.0.8.13
/home/james/Desktop2/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0
/home/james/Desktop2/Desktop/hpctoolkit-install/lib/hpctoolkit/ext-libs/libelf.so.0.8.13
/home/james/Desktop2/Desktop/tar_extract/lib64/libelf.so.0
/home/james/Desktop2/Desktop/tar_extract/lib64/libelf.so.0.8.13

but locate libelf.so.0 still does not find it.

knudfl 03-25-2014 03:07 PM

? May be update the "locate data base" :

# updatedb

jyunker 03-26-2014 10:54 AM

I am sorry. I do not understand what you said.

Please elaborate.

R,

jyunker

Madhu Desai 03-26-2014 11:06 AM

You need to run updatedb so that newly created files are updated in mlocate database. you do that by

Code:

# updatedb
# locate libelf.so.0


schneidz 03-26-2014 11:10 AM

you can try find but it will probably take longer. e.g.:
Code:

find /usr/lib64/ -name libelf.so.0

Madhu Desai 03-26-2014 12:02 PM

Or, since you already know the path... you can just use
Code:

# ls /usr/lib64/libelf.so.0


All times are GMT -5. The time now is 02:11 AM.