LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /bin/sh: bad interpreter: Permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/bin-sh-bad-interpreter-permission-denied-324620/)

itsaso 05-18-2005 06:25 AM

/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...

homey 05-18-2005 07:09 AM

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


itsaso 05-18-2005 08:02 AM

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.

homey 05-18-2005 08:24 AM

Sorry about that.

Maybe try: scp /bin/sh /bin

or maybe apt-get upgrade

itsaso 05-18-2005 09:38 AM

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

Boow 05-18-2005 09:43 AM

on most linux distros /bin/sh is just a symlink to /bin/bash

freakyg 05-18-2005 10:00 AM

try making a symlink from /bin/bash --> /bin/sh


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