11 Replies Latest reply: May 7, 2012 5:52 AM by HeliosLR
HeliosLR Level 1 Level 1 (0 points)

Hi everybody,

 

I'm having a problem with my terminal. When I start an instance of it, this is what shows up:

 

----------------------------------------------------------

 

Last login: Sun May  6 20:34:38 on ttys000

dyld: lazy symbol binding failed: Symbol not found: _tgetent

  Referenced from: /bin/bash

  Expected in: flat namespace

 

dyld: Symbol not found: _tgetent

  Referenced from: /bin/bash

  Expected in: flat namespace

 

 

[Process completed]

 

----------------------------------------------------------

 

The only thing that I can think of that screwed up my terminal is installing the Humdrum package.

It downloads as a .sit file and extracts to a .pkg, which I just installed with the native Apple Installer app.

After it installed I couldn't find Humdrum anywhere, then I tried to use the Terminal for something and was met with this error.

 

I've rebooted but the issue persisted. I Googled for some solutions but none of the solutions provided by others seemed to work.

I'm also hesitant to "fix" any hidden files or code unless I'm sure that it's the cause of the problem... wouldn't want to kill my Mac.

 

I'd really appreciate any help that I can get in fixing this error, I use my Terminal for a lot of things and it's a real inconvenience to have it out of service!

 

Thanks a lot!

 

Helios


MacBook Pro (15-inch Mid 2009), Mac OS X (10.5.8)
  • 1. Re: Terminal won't start
    BDAqua Level 10 Level 10 (116,465 points)

    Might search for an installer log for that pkg, but I think you need to reinstall the complete Terminal pkg & hopefully that'll take care of it.

     

    Get Pacifist...

     

    http://www.charlessoft.com/

     

    then extract/install what you need from your Install Disc.

     

    If all the above fails, then it appears to be time for a relatively painless Archive & Install, which gives you a new/old OS, but can preserve all your files, pics, music, settings, etc., as long as you have plenty of free disk space and no Disk corruption, and is relatively quick & painless...

     

    http://docs.info.apple.com/article.html?artnum=107120

     

    Just be sure to select Preserve Users & Settings.

  • 2. Re: Terminal won't start
    X423424X Level 6 Level 6 (14,190 points)

    HeliosLR wrote:


    The only thing that I can think of that screwed up my terminal is installing the Humdrum package.

    It downloads as a .sit file and extracts to a .pkg, which I just installed with the native Apple Installer app.

    After it installed I couldn't find Humdrum anywhere, then I tried to use the Terminal for something and was met with this error.


    Which one of those things did you install considering the one for OSX only says up to 10.3 and you are using 10.5.8?  Why would you even bother downloading it?


    I downloaded the 10.3 version and int installs:


    /usr/local/bin/gawk

    /usr/local/bin/humdrum

    /usr/share/man/man1/...a crap load of man pages...64 of them...


    None of that should affect your terminal launch.  But there is something funny looking in the pkg postinstall script.  Look at /etc/profile and see what you have there.  It's a text file so use your favorite text editor to look at it.  


    I don't know if this has changed from 10.5.x to 10.6.x but here's what my /etc/profile looks like:

    # System-wide .profile for sh(1)


    if [ -x /usr/libexec/path_helper ]; then

            eval `/usr/libexec/path_helper -s`

    fi


    if [ "${BASH-no}" != "no" ]; then

            [ -r /etc/bashrc ] && . /etc/bashrc

    fi


    The pkg postinstall script is a perl script and it appears to be appending to /etc/profile a bunch of stuff for adding humdrum to the execution PATH and exporting a few environment variables. That may affect the way terminal launches (I didn't analyze it in too much detail).  You should remove any additions you find there.

  • 3. Re: Terminal won't start
    HeliosLR Level 1 Level 1 (0 points)

    X423424X wrote:

     

    Which one of those things did you install considering the one for OSX only says up to 10.3 and you are using 10.5.8?  Why would you even bother downloading it?

     

     

    I guess I was a bit desperate.

     

    X423424X wrote:

     

    None of that should affect your terminal launch.  But there is something funny looking in the pkg postinstall script.  Look at /etc/profile and see what you have there.  It's a text file so use your favorite text editor to look at it. 

     

    I don't know if this has changed from 10.5.x to 10.6.x but here's what my /etc/profile looks like:

    # System-wide .profile for sh(1)

     

    if [ -x /usr/libexec/path_helper ]; then

            eval `/usr/libexec/path_helper -s`

    fi

     

    if [ "${BASH-no}" != "no" ]; then

            [ -r /etc/bashrc ] && . /etc/bashrc

    fi

     

    The pkg postinstall script is a perl script and it appears to be appending to /etc/profile a bunch of stuff for adding humdrum to the execution PATH and exporting a few environment variables. That may affect the way terminal launches (I didn't analyze it in too much detail).  You should remove any additions you find there.

     

    I looked through my /etc/profile script and deleted the stuff that Humdrum appended, so that at the end my script looks exactly like yours. But nothing has changed, my Terminal is still displaying the same error message as before.

     

    -------------------------------

     

    Last login: Mon May  7 15:31:36 on ttys000

    dyld: lazy symbol binding failed: Symbol not found: _tgetent

      Referenced from: /bin/bash

      Expected in: flat namespace

     

    dyld: Symbol not found: _tgetent

      Referenced from: /bin/bash

      Expected in: flat namespace

     

     

    [Process completed]

     

    --------------------------------

     

    I'd like to reinstall the Terminal.app using Pacifist like BDAqua suggested, but as I'm outstation now and have left my install disc back home I'll have to wait until next month before I can get my hands on it again to reinstall the app.

     

    I don't suppose the error message in Terminal gives any clues?

     

    At any rate, I really appreciate the help! Thanks a lot!

     

    Helios

  • 4. Re: Terminal won't start
    X423424X Level 6 Level 6 (14,190 points)

    No it doesn't geve me any clues.  I also don't think reinstalling terminal.app will fix anything.  But you will find that out for yourself.

     

    Some experiments:

     

    Try launching terminal in another account.

     

    Try launching terminal when booting in safe mode.

     

    Post the text files /etc/profile and /etc/bashrc.  If you say your /etc/profile now looks like mine just post /etc/bashrc.

  • 5. Re: Terminal won't start
    HeliosLR Level 1 Level 1 (0 points)

    /etc/bashrc looks like:

    # System-wide .bashrc file for interactive bash(1) shells.

    if [ -z "$PS1" ]; then

       return

    fi

     

    PS1='\h:\W \u\$ '

    # Make bash check its window size after a process completes

    shopt -s checkwinsize

     

    and /etc/profile, just for reference, looks like:

    # System-wide .profile for sh(1)

     

    if [ -x /usr/libexec/path_helper ]; then

        eval `/usr/libexec/path_helper -s`

    fi

     

    if [ "${BASH-no}" != "no" ]; then

        [ -r /etc/bashrc ] && . /etc/bashrc

    fi

     

    I also looked through my bash crash logs and came up with this, not sure if it'll help:

     

    Process:     bash [1111]
    Path:        /bin/bash
    Identifier:  bash
    Version:     ??? (???)
    Code Type:   PPC (Translated)

    Parent Process:  login [1110]

     

    Date/Time:   2012-05-07 16:51:31.526 +0800
    OS Version:  Mac OS X 10.5.8 (9L31a)

    Report Version:  6

    Anonymous UUID:  B56E9D5C-0956-4454-8F0B-96F02D3BCAA3

     

    Exception Type:  EXC_CRASH (SIGTRAP)

    Exception Codes: 0x0000000000000000, 0x0000000000000000

    Crashed Thread:  0

     

    Thread 0 Crashed:

    0   ???                       0x8019d40a 0 + 2149176330
    1   translate                 0xb80b6b00 0xb8000000 + 748288
    2   translate                 0xb80b7007 0xb8000000 + 749575
    3   translate                 0xb80d49c0 0xb8000000 + 870848
    4   translate                 0xb813d75f spin_lock_wrapper + 4259
    5   translate                 0xb8011b64 0xb8000000 + 72548

     

    Thread 1:

    0   ???                       0x800bc166 0 + 2148254054
    1   ???                       0x800c395c 0 + 2148284764
    2   translate                 0xb818b6ea CallPPCFunctionAtAddressInt + 202886
    3   ???                       0x800ed055 0 + 2148454485
    4   ???                       0x800ecf12 0 + 2148454162

     

    Thread 0 crashed with X86 Thread State (32-bit):

      eax: 0x00000000  ebx: 0xb80b6c78  ecx: 0xb7fff9ac  edx: 0x8019d40a

      edi: 0xb8208980  esi: 0x00000005  ebp: 0xb7fff9d8  esp: 0xb7fff9ac

       ss: 0x0000001f  efl: 0x00000246  eip: 0x8019d40a   cs: 0x00000017

       ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037

      cr2: 0x80817dfe

     

    Binary Images:

    0xb8000000 - 0xb81d7fe7  translate ??? (???) /usr/libexec/oah/translate

     

    Translated Code Information:

    NO CRASH REPORT

     

     

    Thank you!

     

    Helios

  • 6. Re: Terminal won't start
    X423424X Level 6 Level 6 (14,190 points)

    Not sure what ppc code has to do with this.  Is bash ppc code on your machine?  I wouldn't expect it to be.  If it wasn't for the fact that you cannot launch terminal I'd ask you to do a file coammnd on /bin/bash.

     

    What about running in another account and running when booted in save mode?

  • 7. Re: Terminal won't start
    HeliosLR Level 1 Level 1 (0 points)

    I tried both running in another account and running in safe mode, the same error message popped up for both of them. I don't think bash PPC is running on my machine. I've only used the bash that comes with Mac OSX.

     

    Thanks for your help so far.

     

    Helios

  • 8. Re: Terminal won't start
    X423424X Level 6 Level 6 (14,190 points)

    I don't know what else to suggest at the moment.  I still don't think installing a fresh copy of the code won't change anything but you may as well as try.

     

    One last experiment.  Go to /bin and double click zsh to see if it launches.  If it does, then double click bash also in /bin.

  • 9. Re: Terminal won't start
    HeliosLR Level 1 Level 1 (0 points)

    This is what I get for launching zsh:

    Last login: Mon May  7 18:27:48 on ttys000

    /bin/zsh ; exit;

    dyld: lazy symbol binding failed: Symbol not found: _tgetent

      Referenced from: /bin/bash

      Expected in: flat namespace

     

    dyld: Symbol not found: _tgetent

      Referenced from: /bin/bash

      Expected in: flat namespace

     

     

    [Process completed]

     

     

    And this for bash:

     

    Last login: Mon May  7 18:27:49 on ttys000

    /bin/bash ; exit;

    dyld: lazy symbol binding failed: Symbol not found: _tgetent

      Referenced from: /bin/bash

      Expected in: flat namespace

     

    dyld: Symbol not found: _tgetent

      Referenced from: /bin/bash

      Expected in: flat namespace

     

     

    [Process completed]

     

    Seems that they both just exit. It's the same for any other executables that I run.

     

    Looks like I've screwed up my Terminal big time!

  • 10. Re: Terminal won't start
    HeliosLR Level 1 Level 1 (0 points)

    I just found out that I'm able to execute ONE line of code via the "New Command..." option in the terminal. Here's a screenshot of it:

     

    Picture 1.png

     

    Unfortunately the process always terminates after that.

     

    Is there anything that I could run on this that might possibly help anyone diagnose what has happened with my Terminal?

     

    Thanks in advance!

     

    Helios

  • 11. Re: Terminal won't start
    HeliosLR Level 1 Level 1 (0 points)

    I've solved the problem. Apparently my bash was corrupted. I followed the instructions in this thread, logged in using zsh (login -f yourloginname /bin/zsh), then compiled bash that I downloaded from here (bash 4.2), replaced the executable that was compiled with the executable in /bin/, which solved the problem.

     

    Again, thanks for all the help BDAqua and X423424X, I really appreciate it!