Terminal problems please help

Joined
Mar 19, 2007
Messages
1
Reaction score
0
Points
1
Location
England
Your Mac's Specs
G4 iMac
I'm trying to install software from terminal.
I've just spent half a day installing items from Developer Tools, so now the command "make" is recognised by Terminal, but "compile" still isn't. My first challenge is to install fink; the instructions tell me to unpack, navigate into the folder in Terminal and type "./bootstrap.sh". Terminal tells me there's no such directory, but I can see the file.
Is "./" a command? I've seen it before in abortive attempts to use Terminal. Can somebody point me to the top secret location where all the Terminal programs are stored so I can install them (Ha Ha) and use the thing to compile and install programs rather than just rename files and create/delete directories.
Does anybody know of a resource that tell you how Unix works instead of giving you lines of instructions to copy which don't work if you're stuck with the default Terminal application?
Thanks
Clive
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
First bootstrap.sh is a shell script. To run this little program you need to be in the directory/folder where it is located. Using ./bootstrap.sh, you are saying to run this program which is located in the directory/folder where I setting. That is the reason for the ./, which is the locate of the script.

Normally when you compile something you will use something like gcc, cc, CC, and perl to name a few. If you see compile, it should be a name of a script that contain the compiling options.

As for how Unix works you can search the net, or get your self a book on Unix.
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Do you have gcc installed yet? That is what make generally uses for compiling.

./ is simply a way of identifying the current folder. Have you tried just typing in bootstrap.sh without the leading ./? ...howver, the ./ version should work. Are the permissions right for bootstrap.sh? Is it executable? Perhaps typing "sh <bootstrap.sh" might resolve the issue?

In Terminal, type "env", and look for the PATH variable. It will contain all the locations that Terminal looks when looking for programs whose names you have typed in. If you need to add to it, do something like:

PATH=$PATH:/new_path_element

Finally, I would recommend looking at DarwinPorts vs. Fink. I find it much better. See: http://darwinports.opendarwin.org/
 
Joined
Feb 13, 2005
Messages
1,186
Reaction score
73
Points
48
Location
New Orleans, LA, USA
Your Mac's Specs
13" Macbook Pro 2.26Ghz Unibody 4G RAM 160G HDD Superdrive
IIRC, the Developer Toolkit installs all the gcc stuff and some other utilities that allow you to compile the Darwin ports and other things that you would want to make from the command line, but your default environment won't necessarily point to where it puts all the binaries. I seem to recall having to manually add /opt/local/bin:/opt/local/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin to my $PATH in my .bash_profile before I could start compiling things.

I could be wrong, but I'm pretty sure I needed to modify that before I could get on to bash-ing things about.
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Here is my full PATH var (and I have been compiling software on my Mac, and building things with DarwinPorts for some time):

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/Users/mac57/bin:/usr/local/bin:/opt/local/bin:/usr/X11R6/bin
I got this via the magic Terminal.app command:

Code:
env | grep -i path
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
All you need to do to see your path is this:

echo $PATH
 
Joined
Apr 29, 2006
Messages
4,576
Reaction score
378
Points
83
Location
St. Somewhere
Your Mac's Specs
Mac Studio, M1 Max, 32 GB RAM, 2 TB SSD
Thanks rman - I knew that! Been using Linux too long now; it is the opposite of the Mac paradigm; I tend to do things the complex way!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top