-bash: ./configure: /bin/sh: bad interpreter: Permission denied
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I get this error when I try to compile on a partition mounted from fstab with "user" option. I found this on the LFS FAQ page that explains the issue and the solution:
Quote:
You're most likely getting this while building binutils in Chapter 5 of the LFS Book. The problem is most likely your mount options. You probably have a line in /etc/fstab like:
/dev/hda10 /mnt/lfs ext2 user 1 2
'user' is the mount flag, and it's the problem. To quote from the mount man page:
user: Allow an ordinary user to mount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).
So change the line in /etc/fstab like this:
/dev/hda10 /mnt/lfs ext2 defaults 1 2
Your statement:
Quote:
The directory is just my storage hdd
suggests that this directory is mounted from fstab - perhaps with the offending options.
Another option would be to try to ./configure from /home/user or /tmp.
The error you are getting is the same you would get when you try to run a script that is not executable. This is where you should probably focus your efforts. Can you run just a plain test script on the same drive? same directory? Does it make a diffrence when you run 'sh script' or './script'? Try to narrow down the problem as much as possible.
I had to rerun my x setup this AM on that box (due to reinstalling /a), and I had to use 'sh NVID...' on the box, not just './NVID...'. I cannot run anytype of configure script on that machine, no matter where it came from...
I get this error when I try to compile on a partition mounted from fstab with "user" option. I found this on the LFS FAQ page that explains the issue and the solution:
Your statement:
suggests that this directory is mounted from fstab - perhaps with the offending options.
Another option would be to try to ./configure from /home/user or /tmp.
HTH
That fixed it. You were dead on right. Removed the 'user' option in fstab, and BAM! configuring as we speak.
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
I run my /tmp noexec as a security measure. I outsmarted myself today and when I realized what I did I came here to post a warning to anybody else who might have this problem- but I see my buddy CW already did it on a different mountpoint
Thanks man! I did the same goddam thing and I was like, WTF? I couldn't imagine having gotten a configure file that was cr/lf format, but checked it anyway -- and I have had problems with bash, when called as /bin/sh, screwing up on script files that have CR/LF (I dont remember which version however). Yea, I'm recycling some quick build-a-gentoo scripts I made last year and I forgot that I set my tmpfs mounts to noexec!
Thanks for this thread
edit: actually, I'm thinking this problem was a busybox ash shell, I can't remember which (might have been HP-UX crap too)
Daniel
Last edited by daniel.santos; 02-25-2007 at 07:30 PM.
I just had the same problem but had nothing to do with bash, etc. I was going to rebuild my machine from Ubuntu 10.4 to 10.10 and copied my home folder to an external NTFS hard drive to back it up. After loading 10.10, I copied everything back to my new home folder. In this process, all my executable ./configure files had their "executable" flag reset to not be executable. When I edited the properties of the ./configure file and clicked "Allow executing..." it worked again.
Apparently symbolic links AND executable script attributes don't pass through Windows file format successfully.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.