LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 04-03-2018, 06:30 PM   #1
jaywinston
LQ Newbie
 
Registered: Apr 2017
Distribution: Slackware 14.2
Posts: 2

Rep: Reputation: Disabled
Dynamically linked executable not found by bash but runs using dynamic loader directly


Thank you jefro for the welcome.

The question was that:

Running
Code:
$ ./program
would return error
Code:
-bash: ./program: No such file or directory
But running
Code:
$ /lib/ld-linux.so.2 ./program
would work.

'program' was assembled with as(1) and linked with
Code:
$ ld -dynamic-linker /lib/ld-linux.so -lc -o program program.o
I had found similar questions but the only answers that were close to relevant were that the binary was 32 bits but the system was 64 bits. But in my case, the system is 32 bits and the binary was assembled and linked on it.

I noticed that in linking, I used
Code:
/lib/ld-linux.so
i.e. without the trailing '.2'.

Last edited by jaywinston; 04-04-2018 at 12:28 AM.
 
Old 04-03-2018, 08:44 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,992

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I was going to delete this but let me welcome you first.

We usually like to keep post questions and answers for the benefit of any other members to see. It may seem a simple solution to you but might have helped others. If you would please leave questions and what it took to fix it.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] -bash: ./z80-asm: No such file or directory: inexplicable message when I try to run stf92 Slackware 8 07-29-2013 06:31 PM
slackware 14.0, chroot: failed to run command ‘/bin/bash’: No such file or directory rameshoty Slackware 6 10-18-2012 06:26 AM
how to run .sh directly without cd to the parent directory? wch705 Linux - Newbie 9 11-08-2011 02:20 AM
chroot: cannot run command `/bin/bash': No such file or directory Toadman Linux - Software 9 03-26-2009 02:36 AM
chroot: cannot run command `/bin/bash': No such file or directory hubabuba Slackware 5 03-23-2008 05:37 PM

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

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