Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Stevp1

macrumors regular
Original poster
Dec 8, 2003
171
11
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...

/sw/bin:/sw/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin

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.
 

logicat2001

macrumors regular
Apr 16, 2003
192
0
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:

PID TT STAT TIME COMMAND
2282 std S 0:00.03 -bash

- 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?
. /sw/bin/init.sh

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.

Best,
Logicat

PS:

#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).
 

logicat2001

macrumors regular
Apr 16, 2003
192
0
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.

Best,
Logicat
 

Westside guy

macrumors 603
Oct 15, 2003
6,340
4,158
The soggy side of the Pacific NW
Re: Unix/Fink help

Originally posted by Stevp1
/sw/bin:/sw/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin

/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.
 

Stevp1

macrumors regular
Original poster
Dec 8, 2003
171
11
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.
 

Stevp1

macrumors regular
Original poster
Dec 8, 2003
171
11
Ok, here's the result...

-bash-2.05b$ ps
PID TT STAT TIME COMMAND
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
-bash-2.05b$


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.
 

janey

macrumors 603
Dec 20, 2002
5,316
0
sunny los angeles
jeez dont use fink unless you have to :)
Use DarwinPorts instead:
http://darwinports.opendarwin.org/
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:
Code:
jane@Mordor.local:~ $ echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/Developer/Tools:/sw/bin:/sw/sbin:/usr/X11R6/bin:/Users/jane/stuff
 

Westside guy

macrumors 603
Oct 15, 2003
6,340
4,158
The soggy side of the Pacific NW
Originally posted by Stevp1
Ok, here's the result...

-bash-2.05b$ ps
PID TT STAT TIME COMMAND
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
-bash-2.05b$


What exactly did I ask for?

"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.
 

John Mosby

macrumors newbie
Feb 8, 2007
5
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.