Unix/Fink help

Discussion in 'Mac Apps and Mac App Store' started by Stevp1, Feb 24, 2004.

  1. Stevp1 macrumors regular

    Dec 8, 2003
    I downloaded and installed Fink before I knew what I was doing (still don't), and it seems like I've got stuff all over the place. This is what my Path setting looks like...


    Is that many nested directories right? What I'd like to do is wipe it out completely and start from scratch. is it safe to dump the whole sw directory or is there some things that X11 or OSX needs in there? What else might I need to do?

    thanks for the help.
  2. logicat2001 macrumors regular

    Apr 16, 2003
    Minneapolis, MN
    Is that what you see when you 'echo $PATH' ?

    Try this:
    - open a new terminal window

    - type 'cd ~' just to be sure; this command will change directory to ~, which is unix shorthand for your home directory

    - type 'ps' to show your user's current processes

    What version of OS X are you using? If 10.2 or 10.3 I expect you'll see something like:

    - If it does say bash, try the following commands:
    • cat .profile
    • cat .bash_profile

    In any of the results do you see the following line or something close to it?
    In fact, do you see it twice?

    Reply back: I'd be glad to help. Ask more questions too if you'd like. Also, I'll see about drumming up a short list of my favorite handy unix reference books.



    #1 ) Congrats for jumping into the unix world.

    #2 ) Grab yourself a good Unix reference manual before you hurt yourself. Online forums are super helpful at times, but when on the command line you yield tremendous efficiency and control (with conditions). A paperback reference will really pay off, especially when you find yourself unable to get to your Desktop and are stuck on the command line.

    Might be a bit alarmist, but it's still true: you can get yourself into a mighty pickle by typing in the wrong things at a terminal window command line (again, with conditions but this oversimplification will suffice for now).
  3. logicat2001 macrumors regular

    Apr 16, 2003
    Minneapolis, MN
    Oh, I almost forgot!

    DON'T delete /sw unless you're interested in re-installing fink (which isn't really a big deal because the only thing stored in /sw and it's subdirectories IS the fink install).

    One of the joys of using Fink is how they've integrated all the necessary files into the default OS X directory. Fink will create then place all of its working files into one single directory that doesn't affect any other portions of your OS install.

    Duplicate entries in PATH aren't any big deal but I agree that it's a perfect opportunity to learn while getting your hands dirty cleaning up your unix config.

  4. Westside guy macrumors 603

    Westside guy

    Oct 15, 2003
    The soggy side of the Pacific NW
    Re: Unix/Fink help

    /sw is just fink; nothing else. If you blow it away, the rest of the PATH should continue to work - but of course it's cleaner to remove the "/sw/bin:/sw/sbin" part of the variable.

    BTW if you're using "nested" in the way I think you are, then no it's not a bunch of "nested" directories. The $PATH variable is a list of separate directories delimited with a colon character (":"). When you type the name of an executable program, the shell (bash, tcsh, etc.) will look in each of those locations in turn for the program, and execute the first match it finds. So if you have a program "xeyes" in /sw/bin, and another version of "xeyes" in /usr/local/bin, it will always be the version in /sw/bin that gets executed first.
  5. Stevp1 thread starter macrumors regular

    Dec 8, 2003
    Guys, thanks for the help. Logicat, I'm going to try what you said today, I'll post results later. Westside, that clarifies everything with that path. I understand it better now.
    I actually just got a book yesterday, an O'reilly book, Learning Unix for Mac OSX panther. I'll be digging into that as well.

    Thanks again, I'll be back on soon.
  6. Stevp1 thread starter macrumors regular

    Dec 8, 2003
    Ok, here's the result...

    -bash-2.05b$ ps
    730 std S 0:00.03 -bash
    -bash-2.05b$ cat .profile
    . /sw/bin/init.sh
    -bash-2.05b$ cat .bash_profile
    cat: .bash_profile: No such file or directory

    What exactly did I ask for?

    By the way, everytime I start Terminal, I get the following:

    Last login: Tue Feb 24 22:46:14 on ttyp2
    -bash: /usr/bin/manpath: No such file or directory

    Are my man files jacked up?

    Thanks for the help, again. I look forward to getting more educated on this.
  7. janey macrumors 603


    Dec 20, 2002
    sunny los angeles
    jeez dont use fink unless you have to :)
    Use DarwinPorts instead:
    Of course i shouldnt be talking, cuz i use Fink too lol.

    and btw, if you think that echo $PATH result is long...you dont want to see mine...mine is a disaster...
    Haha on second thought:
    jane@Mordor.local:~ $ echo $PATH
  8. Westside guy macrumors 603

    Westside guy

    Oct 15, 2003
    The soggy side of the Pacific NW
    "cat" just shows the contents of a (text) file.

    .profile is a file that C shells (like tcsh, which was the default in earlier versions of OS X) runs when you first log in, while .bash_profile is the file that the bash shell runs when you first log in.

    Normally when you open a terminal window it's not a "login window", so .bash_profile doesn't get sourced/executed. I've noticed that things in .bash_profile don't always seem to carry over to terminal sessions; so I actually have most of my stuff in the file .bashrc in my home directory, because that file gets executed every time you open a terminal window.

    At a minumum you should make sure you have a .bash_profile (or .bashrc) file that has the following line in it if you're using fink:

    source /sw/bin/init.sh

    When you get more familiar with the command line you can add things like customizing your prompt, etc.
  9. John Mosby macrumors newbie

    Feb 8, 2007
    Denison, Texas
    Can't exec "make" when insalling minicom

    First of all, I'm a very new Fink user.

    I'm trying to install minicom.

    I typed the following in the terminal: fink install minicom
    I was asked for my password. Then after some installations I got this...

    gzip -dc /sw/src/fink-0.28.0.tar.gz | /sw/bin/tar -xf - --no-same-owner --no-same-permissions
    make test PREFIX=/sw
    Can't exec "make": No such file or directory at /sw/lib/perl5/Fink/Services.pm line 403.
    ### execution of make failed, exit code -1
    Failed: compiling fink-0.28.0-11 failed

    I'm not a UNIX user so this is Greek or geek to me. Can anyone help? Thanks.

Share This Page