1752585 Members
4369 Online
108788 Solutions
New Discussion юеВ

Re: bash not executable

 
SOLVED
Go to solution
chris saxey
Occasional Advisor

bash not executable

I tried installing bash 3.2 from the HP-UX porting center, but get the following error:
sh: /usr/local/bin/bash: Execute permission denied.
I thought it might be a simple permission problem , but everyone has execute permissions:
# ls -la /usr/local/bin/
total 27056
dr-xr-xr-x 2 bin bin 8192 Oct 24 16:38 .
dr-xr-xr-x 14 bin bin 8192 Oct 24 16:38 ..
-rwxr-xr-x 1 root sys 18452 Mar 15 2007 autopoint
-rwxr-xr-x 1 root sys 2016356 Mar 21 2007 bash
-r-xr-xr-x 1 root sys 6859 Mar 21 2007 bashbug
-rwxr-xr-x 1 root sys 3658 Apr 16 2007 c_rehash
-rwxr-xr-x 1 root sys 144452 Mar 15 2007 envsubst
-rwxr-xr-x 1 root sys 144480 Mar 15 2007 gettext
-rwxr-xr-x 1 root sys 4607 Mar 15 2007 gettext.sh
-rwxr-xr-x 1 root sys 40800 Mar 15 2007 gettextize
-rwxr-xr-x 1 root sys 556804 Mar 15 2007 gmake
-rwxr-xr-x 1 root sys 71220 Mar 15 2007 iconv
-rwxr-xr-x 1 root sys 435780 Mar 29 2007 less
-rwxr-xr-x 1 root sys 69040 Mar 29 2007 lessecho
-rwxr-xr-x 1 root sys 70816 Mar 29 2007 lesskey
-rwxr-xr-x 1 root sys 208008 Mar 15 2007 msgattrib
-rwxr-xr-x 1 root sys 207912 Mar 15 2007 msgcat
-rwxr-xr-x 1 root sys 139672 Mar 15 2007 msgcmp
-rwxr-xr-x 1 root sys 207968 Mar 15 2007 msgcomm
-rwxr-xr-x 1 root sys 207792 Mar 15 2007 msgconv
-rwxr-xr-x 1 root sys 207756 Mar 15 2007 msgen
-rwxr-xr-x 1 root sys 139036 Mar 15 2007 msgexec
-rwxr-xr-x 1 root sys 208588 Mar 15 2007 msgfilter
-rwxr-xr-x 1 root sys 344804 Mar 15 2007 msgfmt
-rwxr-xr-x 1 root sys 475200 Mar 15 2007 msggrep
-rwxr-xr-x 1 root sys 279852 Mar 15 2007 msginit
-rwxr-xr-x 1 root sys 278076 Mar 15 2007 msgmerge
-rwxr-xr-x 1 root sys 276664 Mar 15 2007 msgunfmt
-rwxr-xr-x 1 root sys 207856 Mar 15 2007 msguniq
-rwxr-xr-x 1 root sys 144500 Mar 15 2007 ngettext
-rwxr-xr-x 1 root sys 3887776 Apr 16 2007 openssl
-rwxr-xr-x 1 root sys 70536 Mar 15 2007 recode-sr-latin
-rwxr-xr-x 1 root sys 772516 Apr 18 2007 rsync
-rwxr-xr-x 1 root sys 699868 Apr 11 2007 wget
-rwxr-xr-x 1 root sys 1074544 Mar 15 2007 xgettext
-rwxr-xr-x 1 root sys 71120 Mar 15 2007 xmlwf

Anyone have an idea on what it might be?
Thanks for your time.
7 REPLIES 7
OldSchool
Honored Contributor

Re: bash not executable

how are you trying to run bash?

should be, at the command prompt, either:

bash

or

/usr/local/bin/bash

things like:

sh bash

will fail....
OldSchool
Honored Contributor

Re: bash not executable

how are you trying to run bash?

should be, at the command prompt, either:

bash

or

/usr/local/bin/bash

things like:

sh bash

will fail....with exactly the message you posted
James R. Ferguson
Acclaimed Contributor

Re: bash not executable

Hi Chris:

I think you mean to do:

# sh -c /usr/local/bin/bash

Regards!

...JRF...

A. Clay Stephenson
Acclaimed Contributor
Solution

Re: bash not executable

You may have bash for the wrong platform (e.g. trying to run an Itanium version on PA-RISC). What does "file /usr/local/bin/bash" report?

The good news is that if bash cannot execute, it cannot do any harm. Why in the Wide World of Sports would anyone want to run bash rather than the POSIX shell on HP-UX? I realize that bash is the world's greatest, most powerful shell but the POSIX while terrible, stupid, bad ... works very well.

If it ain't broke, I can fix that.
chris saxey
Occasional Advisor

Re: bash not executable

I have tried running it using /usr/local/bin/bash, bash (with /usr/local/bin in my PATH), and sh -c /usr/local/bin/bash. All say Execute permission denied.
Thanks
chris saxey
Occasional Advisor

Re: bash not executable

Thanks guys for the answers. It turns out I had an ID10T error. I could have sworn it was an Itanium machine (and I installed the Itanium version of bash), but it was PA-RISC. Thanks again for the help.
chris saxey
Occasional Advisor

Re: bash not executable

You may have bash for the wrong platform (e.g. trying to run an Itanium version on PA-RISC). What does "file /usr/local/bin/bash" report?
File reported IA64 and it was a PA-RISC.
Thanks.