Dear Jeffrey, Forum:

On Feb 2, 2008, at 16:29 , Jeffrey Rolland wrote:

I am trying to install GAP on an iBook 900 MHz running Mac OS 10.4.11 with 640 MB of RAM.

I have a basic GAP install compiled. The problem is getting all the packages configured (or otherwise installed).

The packages are installed in the directory /usr/local/lib/gap4r4/ pkg/. Inside this directory, there is a shell script InstPackages.sh; I am attaching a copy of InstPackages.sh.

When I cd to /usr/local/lib/gap4r4/pkg/ and run ./InstPackages.sh, I get the error message "tcsh: ./InstPackages.sh: Command not found." (I am running tcsh as my default shell.)

Can someone help me trouble-shoot the package installation process?

[[Added in proof :-} I just noticed that script begins with the string "#!/usr/bin/sh". This actually may be the problem (the shells on Mac OS X are usually in "/bin"). Try changing that to "#!/bin/ sh". If that doesn't fix it, read on.]


From the error message you get ("not found"), it appears that the problem is not with the installation script. Typically, shells on Unix-like systems find executable commands with the help of a "shell variable" called PATH. This gives a list of directories in which the shell should look if you type a command that does not begin with a "/".

In addition, files that are to be executed must be marked as executable.

You can determine which of these might be the problem as follows.

It may be that your PATH is not set up to let you execute commands in the current directory. Type the following

% echo $PATH

You should see a string of pathnames interspersed with ':'s. Look at this string and see if you see ":.:" (in the middle), ".:" (at the beginning), or ":." (at the end). If it's there, your problem is probably that the script is not marked to be executed. If it is not there, you can modify your path variable, but the easiest way to fix your problem may be to execute the command using the full path name:

% /usr/local/lib/gap4r4/pkg/InstPackages.sh

To see if the file is executable, type

% ls -l InstPackages.sh

The latter assumes you are in the directory containing that file. You might see something like the following:

% ls -l /bin/sh
-r-xr-xr-x   1 root  wheel  1068844 Apr 24  2007 /bin/sh
% ls -l /etc/motd
-rw-r--r--   1 root  wheel  19 Jul  1  2006 /etc/motd

The first case is an executable, and the row of letters at the beginning has 'x's; the second is not executable and does not have 'x's. Your file should have 'x's. If it does not, you can do one of two things. You can execute this as a shell script:

% sh InstPackages.sh

or you can mark this as executable:

% chmod +x InstPackages.sh

I hope this helps (not knowing how familiar you are with command-line and Unixy operations, I erred on the chatty side).

Justin

--
Justin C. Walker, Curmudgeon at Large
Institute for the Absorption of Federal Funds
-----------
If it weren't for carbon-14, I wouldn't date at all.
-----------


_______________________________________________
Forum mailing list
[email protected]
http://mail.gap-system.org/mailman/listinfo/forum

Reply via email to