LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-28-2014, 08:43 AM   #1
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Rep: Reputation: Disabled
libhamsterdb.so.5 :cannot open shared object file


hi dear,
I have below problem :
Quote:
[root@localhost lib]# mklessfs /etc/lessfs.cfg /lessfs
mklessfs: error while loading shared libraries: libhamsterdb.so.5: cannot open shared object file: No such file or directory
i found this file in /usr/local/lib , and i use from
export LD_LIBRARY_PATH =$LD_LIBRARY_PATH:/usr/local/lib

error be ok, but when i write : #echo $?
result : 4
and next commands not work,
can you help me,Please?
Thanks
 
Old 12-28-2014, 09:08 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Code:
# Be root and:
find /usr -name libhamsterdb.so\* -printf "%h\n" 2>/dev/null|sort -u >> /etc/ld.so.conf.d/lessfs.conf
ldconfig
# To check:
ldconfig -p | grep libhamsterdb
ldd /usr/local/*bin/mklessfs | grep libhamsterdb
 
1 members found this post helpful.
Old 12-29-2014, 01:27 AM   #3
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Original Poster
Rep: Reputation: Disabled
very Thanks dear,
I do your solution :
Quote:
[root@localhost /]# find /usr -name libhamsterdb.so\* -printf "%h\n" 2>/dev/null|sort -u >> /etc/ld.so.conf.d/lessfs.conf
[root@localhost /]# ldconfig
[root@localhost /]# ldconfig -p | grep libhamsterdb
libhamsterdb.so.5 (libc6,x86-64) => /usr/local/lib/libhamsterdb.so.5
libhamsterdb.so (libc6,x86-64) => /usr/local/lib/libhamsterdb.so
[root@localhost /]# ldd /usr/local/*bin/mklessfs | grep libhamsterdb
libhamsterdb.so.5 => /usr/local/lib/libhamsterdb.so.5 (0x00007f5a7da3c000)
[root@localhost /]# mklessfs -c /etc/lessfs.cfg
[root@localhost /]# echo $?
4
[root@localhost /]#
my commands is right?
 
Old 12-29-2014, 03:00 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by hamsaeed View Post
Code:
[root@localhost /]# find /usr -name libhamsterdb.so\* -printf "%h\n" 2>/dev/null|sort -u >> /etc/ld.so.conf.d/lessfs.conf
[root@localhost /]# ldconfig
[root@localhost /]# ldconfig -p | grep libhamsterdb
libhamsterdb.so.5 (libc6,x86-64) => /usr/local/lib/libhamsterdb.so.5
libhamsterdb.so (libc6,x86-64) => /usr/local/lib/libhamsterdb.so
[root@localhost /]# ldd /usr/local/*bin/mklessfs | grep libhamsterdb
libhamsterdb.so.5 => /usr/local/lib/libhamsterdb.so.5 (0x00007f5a7da3c000)
my commands is right?
Yes, these commands fixed things as you can see from 'ldconfig -p' and 'ldd' output.
 
Old 12-29-2014, 03:21 AM   #5
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Original Poster
Rep: Reputation: Disabled
dear , but still I have same problem ,
you thinks problem from where?
 
Old 12-29-2014, 05:09 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
We don't know what your "/etc/lessfs.cfg" contains, if those settings are sane, if there's errors or warnings in /var/log/messages and if your /lessfs is or was already mounted.
 
Old 12-29-2014, 06:39 AM   #7
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Original Poster
Rep: Reputation: Disabled
because i want config lessfs with HamsterDB , it show up error,

i can ./configure HamsterDB but in make of it, show below error ,
Quote:
make[3]: *** [ham_bench] Error 1
make[3]: Leaving directory `/root/Desktop/rpms/hamsterdb-2.1.9/tools/ham_bench'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/Desktop/rpms/hamsterdb-2.1.9/tools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Desktop/rpms/hamsterdb-2.1.9'
make: *** [all] Error 2
[root@localhost hamsterdb-2.1.9]#
so i dont make hamsterdb,
is possible cause for error?
and up error ,what is it?

thanks,

Last edited by hamsaeed; 12-29-2014 at 06:44 AM.
 
Old 12-29-2014, 07:14 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by hamsaeed View Post
i can ./configure HamsterDB but in make of it, show below error ,
Please DO NOT compile software as root user.
Remove /root/Desktop/rpms/hamsterdb-2.1.9 then unpack hamsterdb-2.1.9.tar.gz as unprivileged user.
Now 'cd' into the hamsterdb-2.1.9 directory and type:
Code:
./configure 2>&1 | tee /tmp/hamsterdb-2.1.9.txt
and then attach "/tmp/hamsterdb-2.1.9.txt" to your reply.
 
1 members found this post helpful.
Old 12-29-2014, 09:04 AM   #9
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Original Poster
Rep: Reputation: Disabled
very Thanks,
I do your solution and attached it,
I add two file a one for ./configure another for make that have problem,
HamsterDB.rar
Thanks,
 
Old 12-29-2014, 09:07 AM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
As for me, I don't update the files that drive ldconfig using bash-scripts such as these. I'm much more pedantic. (Read: "I do it by hand ... carefully ... and after backing-up the previous version of the file(s) to avoid accidentally removing my foot.")

The zeroth question is: "Well, if I simply re-run ldconfig, does the problem go away?" New libraries or library-versions won't be found if the cache is not up-to-date, because Linux searches the cache, not the filesystem. If this makes the problem go away, as it often does, then ... " ."

The first question, resolved either with find or perhaps locate, is: "does the library being sought actually exist, and if so, where?" Does more than one version exist? And so on.

The follow-on question is: "does ldconfig know to look there?" And if it doesn't, I'm immediately asking: "Well, why the not?!"

If the library's in the wrong place, then I want to discover why it (erroneously) wound-up where it now is, because "simply moving the thing" might-or might-not actually be sufficient. (Libraries sometimes contain location-dependencies that are built into them by the ./configure script that preceded the make that actually constructed them.) It isn't good-enough for me simply to conclude that something was done incorrectly, because I presume that, when the "mistake" was made, it was earnestly thought to be correct.

Also bear in mind that, when libraries have dependencies on other libraries, the messages that you see might actually be referring to those other libraries. (It happens ...)
 
Old 12-29-2014, 11:32 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Let's try:
Code:
grep -i boost /home/hamid/hamsterdb-2.1.9/config.log
rpm -qf /usr/local/include/boost/filesystem/operations.hpp
rpm -qa|egrep -ie "(hamster|boost)"
find /lib /opt /usr -type f \( -name operations.hpp -o -name \*hamster\* -o -iname \*boost\* \) -printf "rpm -qf \"%p\"\n"|/bin/sh
 
Old 12-30-2014, 03:44 AM   #12
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Original Poster
Rep: Reputation: Disabled
Thanks,
I do your commands and result of them :
Quote:
[hamid@localhost hamsterdb-2.1.9]$ rpm -qf /usr/local/include/boost/filesystem/operations.hpp
file /usr/local/include/boost/filesystem/operations.hpp is not owned by any package
[hamid@localhost hamsterdb-2.1.9]$
Quote:
[hamid@localhost hamsterdb-2.1.9]$ rpm -qa|egrep -ie "(hamster|boost)"
boost-iostreams-1.41.0-18.el6.x86_64
boost-serialization-1.41.0-18.el6.x86_64
boost-devel-1.41.0-18.el6.x86_64
boost-math-1.41.0-18.el6.x86_64
boost-date-time-1.41.0-18.el6.x86_64
boost-wave-1.41.0-18.el6.x86_64
boost-graph-1.41.0-18.el6.x86_64
boost-signals-1.41.0-18.el6.x86_64
boost-filesystem-1.41.0-18.el6.x86_64
boost-regex-1.41.0-18.el6.x86_64
boost-python-1.41.0-18.el6.x86_64
boost-program-options-1.41.0-18.el6.x86_64
boost-test-1.41.0-18.el6.x86_64
boost-system-1.41.0-18.el6.x86_64
boost-thread-1.41.0-18.el6.x86_64
boost-1.41.0-18.el6.x86_64
[hamid@localhost hamsterdb-2.1.9]$
Quote:
[root@localhost hamsterdb-2.1.9]# find /lib /opt /usr -type f \( -name operations.hpp -o -name \*hamster\* -o -iname \*boost\* \) -printf "rpm -qf \"%p\"\n"|/bin/sh
boost-regex-1.41.0-18.el6.x86_64
boost-iostreams-1.41.0-18.el6.x86_64
boost-devel-1.41.0-18.el6.x86_64
boost-test-1.41.0-18.el6.x86_64
boost-iostreams-1.41.0-18.el6.x86_64
boost-graph-1.41.0-18.el6.x86_64
boost-test-1.41.0-18.el6.x86_64
boost-filesystem-1.41.0-18.el6.x86_64
boost-serialization-1.41.0-18.el6.x86_64
boost-signals-1.41.0-18.el6.x86_64
boost-system-1.41.0-18.el6.x86_64
boost-regex-1.41.0-18.el6.x86_64
boost-serialization-1.41.0-18.el6.x86_64
boost-thread-1.41.0-18.el6.x86_64
boost-date-time-1.41.0-18.el6.x86_64
boost-signals-1.41.0-18.el6.x86_64
kernel-devel-2.6.32-431.el6.x86_64
swig-1.3.40-6.el6.x86_64
vim-common-7.2.411-1.8.el6.x86_64
boost-devel-1.41.0-18.el6.x86_64
libstdc++-devel-4.4.7-4.el6.x86_64
file /usr/local/lib/libboost_log.a is not owned by any package
file /usr/local/lib/libboost_random.a is not owned by any package
file /usr/local/lib/libboost_context.a is not owned by any package
file /usr/local/lib/libboost_iostreams.so.1.57.0 is not owned by any package
file /usr/local/lib/libboost_unit_test_framework.so.1.57.0 is not owned by any package
file /usr/local/lib/libboost_locale.so.1.57.0 is not owned by any package
file /usr/local/lib/libboost_thread.so.1.57.0 is not owned by any package
file /usr/local/include/boost/icl/detail/boost_config.hpp is not owned by any package
file /usr/local/include/boost/atomic/detail/operations.hpp is not owned by any package
file /usr/local/include/boost/geometry/geometries/adapted/boost_array.hpp is not owned by any package
file /usr/local/include/boost/geometry/geometries/adapted/boost_fusion.hpp is not owned by any package
file /usr/local/include/boost/geometry/geometries/adapted/boost_tuple.hpp is not owned by any package
file /usr/local/include/boost/geometry/geometries/adapted/boost_polygon.hpp is not owned by any package
[root@localhost hamsterdb-2.1.9]#
you thinks problem from where?
 
Old 12-30-2014, 04:42 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by hamsaeed View Post
I do your commands and result of them
Thanks but you forgot to post output of 'grep -i boost /home/hamid/hamsterdb-2.1.9/config.log'. It doesn't matter right now but for the future remember to be precise and complete. Else things are going to be very inefficient.


Quote:
Originally Posted by hamsaeed View Post
you thinks problem from where?
Yes, for example the boost-devel RPM puts "operations.hpp" in /usr/include/boost/filesystem/ and you show also the same file name in /usr/local/include/boost/atomic/detail/. This happened because you mixed installing software from packages (via Yum) and manually from source (.tar.gz). Decide based on if you need a particular version which software you keep. Else you will have to configure building and using software manually by using non-standard header and library locations. This practice is prone to errors if you do not know how to do that properly and operability / debugging may be severely hampered to boot.
 
Old 12-30-2014, 05:50 AM   #14
hamsaeed
Member
 
Registered: Dec 2014
Posts: 47

Original Poster
Rep: Reputation: Disabled
hi,
ok , below link for :'grep -i boost /home/hamid/hamsterdb-2.1.9/config.log'

hamsterdb

please cheek it,
 
Old 12-30-2014, 06:20 AM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I said it doesn't matter right now. Proceed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libgda-4.0.so.4: cannot open shared object file mahesh1234 Linux - Newbie 2 10-22-2013 11:06 PM
error while loading shared libraries: libexpat.so.0: cannot open shared object file: Naimbora Linux - General 2 08-02-2013 01:53 PM
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: vswapnasr@gmail.com Linux - Software 1 05-04-2013 06:49 AM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration