LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-18-2005, 06:25 AM   #1
itsaso
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
/bin/sh: bad interpreter: Permission denied


First of all sorry about my bad English and hi to everybody
I am new to this forum. i have a problem that i haven't been able to solve yet. I use Debian testing as my distro, and i deleted by error my /bin/sh, i copied from another machine usin scp and tried "apt-get install --reinstall bash" but it does not seem to take any effect. please, if would thank it a lot...
 
Old 05-18-2005, 07:09 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Quote:
i copied from another machine usin scp
Hi,

If you made the file in Windows notepad, it likely put in some extra characters which Linux doesn't like.
You could use tr to remove the \015 or just make the file in Linux using something like kwrite or vi editors.

For example:
Code:
tr -d '\015' file.txt > file1.txt
mv file1.txt file.txt
 
Old 05-18-2005, 08:02 AM   #3
itsaso
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
maybe i haven't explained well my problem. i copied /bin/sh from another linux machine by 'scp anothermachine:/bin/sh/ /bin/' but it didn't work. if you had any other suggestion... thanks.
 
Old 05-18-2005, 08:24 AM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Sorry about that.

Maybe try: scp /bin/sh /bin

or maybe apt-get upgrade
 
Old 05-18-2005, 09:38 AM   #5
itsaso
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Finally i have made a symlink from /bin/bash to /bin/sh
cd /bin; ln -s bash sh
and it seems to work.

Thanks for the help
 
Old 05-18-2005, 09:43 AM   #6
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
on most linux distros /bin/sh is just a symlink to /bin/bash
 
Old 05-18-2005, 10:00 AM   #7
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
try making a symlink from /bin/bash --> /bin/sh
 
  


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
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 08:25 AM
Selinux, ./INSTALL: /bin/sh: bad interpreter: Permission denied TomF Linux - Security 2 12-08-2004 11:36 AM
: bad interpreter: Permission denied LinuxRam Linux - Newbie 2 08-22-2004 09:33 PM
/bin/sh: bad interpreter: Permission denied linmix Linux - Software 12 08-16-2004 06:40 AM
perl: bad interpreter: Permission denied bulliver Linux - Software 4 01-27-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:17 PM.

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