"which" command missing

I'm new to FreeBSD. I need to install Firebird 2.1 Server on a FreeBSD 7 amd64, and I'm doing it via pkg_add. The installation interrupts with a error:
Code:
which: not found.[.code]

After some checks I discovered that the [FILE]which[/FILE] command is missing on the system, I think this is strange because it should be a "builtin" command.
So, how to install the "[FILE]which[/FILE]" command? In the ports there is the "Gnu which" that I have installed but it is missing the "[FILE]-s[/FILE]" option that is used in the Firebird installation script so I can't use it.

I don't have physical access to the machine (I access it via ssh) so I need something to download from the internet.
Thanks in advance,

Giorgio
 
which(1) is not a built-in, it's an external command (external meaning not build into the shell). It lives in /usr/bin/which. Does that exist?
 
Even a minimal install would install which(1).

How did you do the install? Do you have the source tree available in /usr/src/?
 
No I'm not the installer of the system.. I'm working on a machine not installed by me. The source tree isn't avaiable in /usr/src. For example I have installed php by setting the environment variable PACKAGESITE to the ftp server and then via pkg_add -rv.
 
Well, without the sources or knowing how the system was installed I have no idea how to fix it.

You could try freebsd-update(8) and hope it comes along during an update.
 
Thanks for your help.

I tried to install Firebird 2.5 and it worked without problems, so the problem is only with 2.1. "which" is missing still, but I have solved my problem with 2.5.
 
I would not trust very much the system you are installing onto....sounds like a corruption has happened. It could be either that your admin has deleted which(1) or something bad happened....but this is my opinion.
 
Both FreeNAS 8 and pfsense 1.2.3 do not remove which(1), but it is a good guess that it could be an appliance without such command. Again, if not an appliance, I would not trust very much system because it could have been tampered.
 
Back
Top