Operating System - HP-UX
1752805 Members
5638 Online
108789 Solutions
New Discussion юеВ

Re: Bash Shell Installation Problem

 
SOLVED
Go to solution
Dauren
Occasional Advisor

Bash Shell Installation Problem

Hi I've HP-UX 11.23 IA-64

I've installed:

- bash-4.0.033-ia64-11.23.depot
- gettext-0.17-ia64-11.23.depot
- libiconv-1.13.1-ia64-11.23.depot
- termcap-1.3.1-ia64-11.23.depot

But the result is:
# bash
sh: bash: not found.

Here is some previous comments
*bash isn't in your PATH ;)
try "whereis bash" and run it with full path (or redefine you PATH variable*

Then my actions:

# whereis bash
bash: /usr/local/man/man1/bash.1

# bash /usr/local/man/man1/bash.1
sh: bash: not found.

Sorry, but I may ask some silly questions but I'm novice in UNIX OS (HP-UX)
8 REPLIES 8
Steven Schweda
Honored Contributor
Solution

Re: Bash Shell Installation Problem

> # whereis bash
> bash: /usr/local/man/man1/bash.1

If the "man" page was installed under
"/usr/local", then the "bash" program
probably should have been, too.

find /usr/local -name bash

If that fails, you might try:

find /opt -name bash

Normally, I'd expect it to be
"/usr/local/bin/bash", but I don't know who
built those depots, or how.

> *bash isn't in your PATH ;)

echo $PATH
Matti_Kurkela
Honored Contributor

Re: Bash Shell Installation Problem

Try starting bash using the full pathname:

/usr/local/bin/bash

If that works, edit /etc/PATH to add /usr/local/bin to the default PATH setting of the system. Then logout & login to make the change effective in your session.

If the user types a command without using the full pathname, the system will try to find the command binary in the directories listed in the PATH environment variable. Most shells will also have some internal commands, which can be executed without loading anything from the disk.

MK
MK
Dauren
Occasional Advisor

Re: Bash Shell Installation Problem

I've re-installed all 4 apps. By the way I downloaded them from http://hpux.connect.org.uk/hppd/hpux

# whereis bash
bash: /usr/local/bin/bash /usr/local/man/man1/bash.1 /usr/local/share/man/man1/bash.1

Then again:

# bash /usr/local/bin/bash
sh: bash: not found.
# bash /usr/local/man/man1/bash.1
sh: bash: not found.
# bash /usr/local/share/man/man1/bash.1
sh: bash: not found.

# man bash
works fine (have the description of command)


The result of find:
# find /usr/local -name bash
/usr/local/bin/bash
/usr/local/doc/bash
/usr/local/var/adm/sw/products/bash

But anyway:

# bash
sh: bash: not found.
Horia Chirculescu
Honored Contributor

Re: Bash Shell Installation Problem

Hello,

You should edit /etc/PATH and add at the end:

:/usr/local/bin

Save the file and logout from you shell then log back in (Or you could source again your profile in order to prevent logoff)

Horia.

Best regards from Romania,
Horia.
Dennis Handly
Acclaimed Contributor

Re: Bash Shell Installation Problem

>may ask some silly questions but I'm novice in UNIX OS

This is elementary shells 101. If you don't want to use an absolute path, you must set $PATH to where you want to find your software.
If you don't understand this, you are doomed to always specify the absolute path to bash.

# whereis bash
bash: /usr/local/bin/bash

The proper real shell command is:
whence bash

# bash /usr/local/bin/bash
sh: bash: not found.

This means you need to do:
/usr/local/bin/bash

>The result of find: /usr/local/bin/bash

As Steven said. You need to fix your $PATH, or /etc/PATH if you want to do it for everyone.

WARNING: Do NOT set root's shell to bash! You can invoke bash to switch shells.
Dauren
Occasional Advisor

Re: Bash Shell Installation Problem

Thanks everybody. I've edited /etc/PATH as you advised and now bash works fine.
Matti_Kurkela
Honored Contributor

Re: Bash Shell Installation Problem

# bash /usr/local/bin/bash
sh: bash: not found.

The above command is not what I meant.

Try instead:

# /usr/local/bin/bash

If that does not work, and still causes an error message like "sh: /usr/local/bin/bash: not found", then it might be because although /usr/local/bin/bash is there, one of the libraries required by it cannot be found.

Try running:

# ldd /usr/local/bin/bash

It should list all the libraries required by bash. If it says "not found" on any of them, that is the most likely cause for your problem.

MK
MK
Dauren
Occasional Advisor

Re: Bash Shell Installation Problem

2 MK:

I've re-edited /etc/PATH and tried /usr/local/bin/bash - it works (realised my mistake)

# ldd /usr/local/bin/bash
libtermcap.so => /usr/local/lib/hpux32/libtermcap.so
libintl.so => /usr/local/lib/hpux32/libintl.so
libdl.so.1 => /usr/lib/hpux32/libdl.so.1
libc.so.1 => /usr/lib/hpux32/libc.so.1
libiconv.so => /usr/local/lib/hpux32/libiconv.so
libc.so.1 => /usr/lib/hpux32/libc.so.1

All libraries are OK.

Thanks for promt and comprehensive answers.