Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-06-2004, 03:20 AM   #1
LQ Newbie
Registered: Jun 2004
Distribution: RedHat 6.1
Posts: 3

Rep: Reputation: 0
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"?

In preparation for trying to build glibc-2.2.4 from source, I've been upgrading various programs (per the Glibc Installation HOWTO on tldp), including static-building bash-2.05b, on a RedHat 6.1 (i586, Intel P233) with gcc 2.95-3, using checkinstall-1.5.2-1 to do "make install", create the rpm and update the package database.

I got a strange behavior; once the new bash was installed in /usr/local/bin (the default for the GNU source), I could no longer open a terminal window. Rebooting gave errors because /bin/bash and the "/bin/sh -> bash" symlink had vanished! I fixed this using Tom's RTBT to access the HD and copy the new bash to /bin and create a new symlink, but I'm wondering why these had disappeared in the first place? I haven't had this happen with any other programs built from source and installed using checkinstall ( I'm usually building new programs from source because of dependency "hell", and am not particularly keen on updating my distribution version as I'm using old hardware).

Thanks in advance,

Old 06-06-2004, 06:51 AM   #2
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Uh, $BASH does not get installed to /usr/local/bin
it goes in /bin, there is a symlink from /usr/bin that points
to /bin, if you want you can put a symlink in /usr/local/bin
BUT, $BASH has to be accessible to all it
gets install to /bin
Old 06-06-2004, 07:42 PM   #3
LQ Newbie
Registered: Jun 2004
Distribution: RedHat 6.1
Posts: 3

Original Poster
Rep: Reputation: 0
The question I was asking was why did this install delete /bin/bash, and the /bin/sh symlink (which shouldn't
have been touched at all) .

I know that bash is supposed to install to /bin; however, almost all, if not all, GNU sources of any program
default to installing under /usr/local/ (this makes it possible to have installed, for example, two different versions
of some programs (one under /usr/local and one under /usr or / for example), necessary in case of problems
with the new version). I could have added --prefix=/ (to get the new version to install directly to /bin) to
the ./configure command line, but didn't want to replace the existing bash until the new build was tested.

As I used the GNU defaults for configure, the new bash installed to /usr/local/bin, and should not have
touched anything at all in /bin. My only immediate mistake was failing to copy the new bash immediately
to /bin before rebooting, and if I had done that, I would not have discovered that the original /bin/bash
had disappeared (though with /bin/sh -> bash gone, the lack of sh would have been noticed quickly!)

If I had not had at least one emergency rescue disk available (I've got Knoppix, Tom's RTBT & LinuxCare
Rescue), I'd have had to re-install and re-build the entire 6.1 distribution.

Regards, John


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why "bash-2.05b$" in Terminal instead of "username@localhost username" jayelitumbiolo Linux - General 9 10-04-2009 04:16 AM
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 03:57 PM
bash equivalence of tcsh "alias em "emacs \!:1 &""? rgiggs Slackware 3 07-29-2004 03:07 AM
bash-2.05b# Xlib: extension "XFree86-DRI" missing on display ":0.0". citrus Linux - General 8 02-22-2004 11:43 AM
bin/bash:usr/bin/lpr NO SUCH FILE OR DIRECTORY Adibe_Hamm Linux - Newbie 3 10-14-2003 03:30 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration