The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Permission denied big123456 UNIX for Advanced & Expert Users 1 10-10-2007 04:17 AM
bad interpreter: Permission denied earnstaf UNIX for Dummies Questions & Answers 7 07-19-2007 03:17 PM
./ Permission Denied. trouscaillon UNIX for Dummies Questions & Answers 8 01-26-2005 06:33 PM
rcp 'permission denied' Kevin Pryke UNIX for Dummies Questions & Answers 6 04-24-2002 01:20 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-04-2003
Registered User
 

Join Date: Jun 2002
Location: Edinburgh
Posts: 39
/bin/sh: bad interpreter: Permission denied

today i started the LFS book (version 4.0).
Basically i am using slackware 9.0 to try and install a new linux completely from source on another partition.

Now i took the book's recommendations and created a user called lfs so i wouldn't have to do the stuff as root, and i have got the new LFS partition mounted at /mnt/lfs
the first thing we do is to compile a static version of bash to put in our new linux partition, because we want a statically compiled working set of utilities with which to build the new system when we chroot into the new location (at /mnt/lfs, or /dev/hda6 to its mates).
Now the thing is, well you can see what the thing is here:

Code:
lfs@boxotrix:/mnt/lfs/static/sources/bash-2.05a$ ./configure --enable-static-link 
--prefix=/mnt/lfs/static --with-curses && make && make install

-su: ./configure: /bin/sh: bad interpreter: Permission denied

lfs@boxotrix:/mnt/lfs/static/sources/bash-2.05a$ su
Password:

root@boxotrix:/mnt/lfs/static/sources/bash-2.05a# ./configure --enable-static-link 
--prefix=/mnt/lfs/static --with-curses && make && make install

bash: ./configure: /bin/sh: bad interpreter: Permission denied

root@boxotrix:/mnt/lfs/static/sources/bash-2.05a# exit

lfs@boxotrix:/mnt/lfs/static/sources/bash-2.05a$ ls -al /bin/sh

lrwxrwxrwx    1 root     root            4 Apr 20 18:44 /bin/sh -> bash*

lfs@boxotrix:/mnt/lfs/static/sources/bash-2.05a$ ls -al /bin/bash

-rwxr-xr-x    1 root     bin        628664 Sep 22  2002 /bin/bash*
the first attempt is as user "lfs" but then i su to root and get the same error! any idea what the issue is? i am stumped.
Reply With Quote
Forum Sponsor
  #2  
Old 05-04-2003
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
try running configure with sh, eg;
sh configure
Reply With Quote
  #3  
Old 05-05-2003
Registered User
 

Join Date: Jun 2002
Location: Edinburgh
Posts: 39
hmm, i thought that was going to work for a minute, but:
Code:
lfs@boxotrix:/mnt/lfs/static/sources/bash-2.05a$ sh ./configure

checking build system type... ./support/config.guess: line 900: ./dummy-640: Permission denied
./support/config.guess: line 1291: ./dummy-640: Permission denied
configure: error: cannot guess build type; you must specify one

lfs@boxotrix:/mnt/lfs/static/sources/bash-2.05a$ su
Password:

root@boxotrix:/mnt/lfs/static/sources/bash-2.05a# sh configure

checking build system type... ./support/config.guess: line 900: ./dummy-788: Permission denied
./support/config.guess: line 1291: ./dummy-788: Permission denied
configure: error: cannot guess build type; you must specify one
thanks for the input though...
Reply With Quote
  #4  
Old 05-05-2003
Registered User
 

Join Date: Jul 2002
Location: new york
Posts: 1,025
well running configure without sh was the problem. now the problem is a configure problem. take a look at the INSTALL file for bash if its there. someone else here might be able to tell you what to do, i am not too sure what options you have to pass to configure to get it to work. but that is how your run it;
sh configure


oh one more thing, you can run configure and make as normal users, but make install you will need root permissions to do.
Reply With Quote
  #5  
Old 05-06-2003
Registered User
 

Join Date: Jun 2002
Location: Edinburgh
Posts: 39
well, the 'INSTALL' says:
Quote:
The simplest way to compile Bash is:

1. `cd' to the directory containing the source code and type
`./configure' to configure Bash for your system. If you're using
`csh' on an old version of System V, you might need to type `sh
./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes some time. While running, it prints
messages telling which features it is checking for.

2. Type `make' to compile Bash and build the `bashbug' bug reporting
script.

3. Optionally, type `make tests' to run the Bash test suite.

4. Type `make install' to install `bash' and `bashbug'. This will
also install the manual pages and Info file.

The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package
(the top directory, the `builtins', `doc', and `support' directories,
each directory under `lib', and several others). It also creates a
`config.h' file containing system-dependent definitions. Finally, it
creates a shell script named `config.status' that you can run in the
future to recreate the current configuration, a file `config.cache'
that saves the results of its tests to speed up reconfiguring, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure'). If at some point `config.cache' contains
results you don't want to keep, you may remove or edit it.
......
Quote:
Specifying the System Type
==========================

There may be some features `configure' can not figure out
automatically, but need to determine by the type of host Bash will run
on. Usually `configure' can figure that out, but if it prints a
message saying it can not guess the host type, give it the
`--host=TYPE' option. `TYPE' can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
`CPU-COMPANY-SYSTEM' (e.g., `i386-unknown-freebsd4.2').

See the file `support/config.sub' for the possible values of each field.
i feel a little silly i never saw this before, but i am still a little confused about why it can't guess the system type on its own, it's linux 2.4.20 on an i686 (slackware 9.0) which is hardly an unusual system type one would imagine...

Last edited by Calum; 05-06-2003 at 06:57 AM.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0