LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-05-2011, 12:49 AM   #1
b_senthilbe
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Rep: Reputation: 0
chroot fails with "error while loading shared libraries"


Hi,

I am newbee to linux. I am trying to executing a script which does "chroot" for an executable. But I am getting following error.

The chroot in the script is
chroot /var/mnt/test /testbin/myapp

The script bails out with following error.

/testbin/myap: error while loading shared libraries: cannot open shared object file: cannot load shared object file: No such file or directory


I tried ldd for the application. All the shared libraries which are required for myapp are present. Please help me to solve this

- Thanks,
Senthil
 
Old 02-05-2011, 03:11 AM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Are they present in the chroot jail? More specifically, Are they in /var/mnt/test? Anything needed for a running system must exist in the chroot because they will not see anything except their changed root.
 
1 members found this post helpful.
Old 02-05-2011, 12:55 PM   #3
b_senthilbe
LQ Newbie
 
Registered: Feb 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Great. I found a library missing in the chroot jail. I am having some other issues with my system now. I will let you know once it becomes ready.
 
Old 02-07-2011, 05:01 PM   #4
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
If the binary loads some libraries only if they're needed, like libresolv.so, they won't show up in the ldd output. In those cases, run strings binary | grep -e '\.so[\.0-9]*$' to see if the binary contains the names of any other dynamic libraries.
Nominal Animal

Last edited by Nominal Animal; 03-21-2011 at 07:17 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot fails with "error while loading shared libraries" b_senthilbe Linux - Newbie 3 02-05-2011 01:00 PM
[SOLVED] At run time get: "Error while loading shared libraries: libgdal.so.1:" firani Linux - Newbie 1 06-14-2010 01:05 PM
[SOLVED] XFburn, Slackware 13 64bit, "error while loading shared libraries: libburn.so.4" fearfactory Linux - Software 1 05-16-2010 08:30 PM
Did something get installed wrong? "error while loading shared libraries" Romanus81 Slackware 4 03-28-2008 11:11 PM
Linux boot hang : "init: error loading shared libraries" colinprice72 Linux - General 0 01-16-2004 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:27 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