mkiraf not working
Cathy wrote on Oct 07, 2006
Hi - I'm trying to install IRAF on my computer, but when I run 'mkiraf', I get the following message:
-bash: mkiraf: command not found
I'm not very familiar with Linux, which doesn't help matters.
Can anyone help?
-bash: mkiraf: command not found
I'm not very familiar with Linux, which doesn't help matters.
Can anyone help?
Mike Fitzpatrick wrote on Oct 07, 2006
It just means the 'local bin directory' you specified to the install script isn't in your default $PATH. You can access the commands by specifying the full path, e.g. /usr/local/bin/mkiraf, or else edit your .bashrc or .login file to add the path in the PATH variable.
-Mike
-Mike
Cathy wrote on Oct 07, 2006
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
. /home/Catherine/SciSoft/scisoft/bin/Setup.bash
alias iraf="csh /SciSoft/scisoft/share/iraf/iraf/unix/hlib/irafuser.csh;
cd; cd iraf; cl"
is my .bashrc file. Do I need to put in something telling it where the mkiraf script is? Sorry, I'm really clueless about this - I only installed Linux yesterday. I've tried running the command by specifying the path, but nothing happens - no error message, it doesn't do anything.
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
. /home/Catherine/SciSoft/scisoft/bin/Setup.bash
alias iraf="csh /SciSoft/scisoft/share/iraf/iraf/unix/hlib/irafuser.csh;
cd; cd iraf; cl"
is my .bashrc file. Do I need to put in something telling it where the mkiraf script is? Sorry, I'm really clueless about this - I only installed Linux yesterday. I've tried running the command by specifying the path, but nothing happens - no error message, it doesn't do anything.
Mike Fitzpatrick wrote on Oct 07, 2006
You would ammend your path using something like
A "which mkiraf" command should then return the path to the MKIRAF command so long as the path directory is correct and the 'mkiraf' command link points to an actual script (e.g. the command 'cat /usr/local/bin/mkiraf' prints out the file). IRAF commands run under the C-shell (e.g. tcsh) so be sure you also have that available with a "which tcsh", otherwise the command might be found but the command interpreter to run it isn't.
-Mike
PATH = $PATH:/usr/local/bin
export PATH
A "which mkiraf" command should then return the path to the MKIRAF command so long as the path directory is correct and the 'mkiraf' command link points to an actual script (e.g. the command 'cat /usr/local/bin/mkiraf' prints out the file). IRAF commands run under the C-shell (e.g. tcsh) so be sure you also have that available with a "which tcsh", otherwise the command might be found but the command interpreter to run it isn't.
-Mike
Cathy wrote on Oct 07, 2006
Right, I've put that in my .bashrc, and replaced /usr/local/bin with the path to the directory my mkiraf file is in, and cat will print out the file.
'which tcsh' is working. But 'which mkiraf' isn't:
[Catherine@localhost iraf]$ which mkiraf
/usr/bin/which: no mkiraf in (/scisoft/bin:/scisoft/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/Catherine/bin)
mkiraf is in the directory, though.
[Edit - I've just noticed that it says /scisoft/bin instead of /home/Catherine/SciSoft/scisoft/bin, even though that's what I put in the .bashrc...]]
'which tcsh' is working. But 'which mkiraf' isn't:
[Catherine@localhost iraf]$ which mkiraf
/usr/bin/which: no mkiraf in (/scisoft/bin:/scisoft/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/Catherine/bin)
mkiraf is in the directory, though.
[Edit - I've just noticed that it says /scisoft/bin instead of /home/Catherine/SciSoft/scisoft/bin, even though that's what I put in the .bashrc...]]
Mike Fitzpatrick wrote on Oct 07, 2006
Right, I've put that in my .bashrc, and replaced /usr/local/bin with the path to the directory my mkiraf file is in, and cat will print out the file. 'which tcsh' is working. But 'which mkiraf' isn't:
What is the result of doing a "csh -x /home/Catherine/SciSoft/scisoft/bin/mkiraf"?
This runs the csh interpreter on the file directly in debug mode so you can see what's happening. This is more direct than relying on the csh being invoked automatically (e.g. is the command isn't executable it would also explain the error, but calling csh directly would work if the file is readable).
[Edit - I've just noticed that it says /scisoft/bin instead of /home/Catherine/SciSoft/scisoft/bin, even though that's what I put in the .bashrc...]
The SciSoft setup may have created the /scisoft link automatically.....
-Mike
[/quote]
Cathy wrote on Oct 07, 2006
bash: PATH: command not found
[Catherine@localhost ~]$ csh -x /home/Catherine/SciSoft/scisoft/bin/mkiraf
set iraf = /SciSoft/scisoft/share/iraf/iraf
set imdir = /var/tmp/imdirs
set ttymsg = Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.
unalias rm mkdir pwd echo mkdir sed whoami pushd popd
if ( ! 1 ) then
alias whoami (echo Catherine)
pushd /SciSoft/scisoft/share/iraf/iraf
[Catherine@localhost ~]$
is what comes up. When I open a terminal, it says "bash: PATH: command not found" - could I have done something wrong there?
This is exactly what I put in the .bashrc:
PATH = $PATH:/home/Catherine/SciSoft/scisoft/bin
export PATH
Thanks for your help.
[Catherine@localhost ~]$ csh -x /home/Catherine/SciSoft/scisoft/bin/mkiraf
set iraf = /SciSoft/scisoft/share/iraf/iraf
set imdir = /var/tmp/imdirs
set ttymsg = Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.
unalias rm mkdir pwd echo mkdir sed whoami pushd popd
if ( ! 1 ) then
alias whoami (echo Catherine)
pushd /SciSoft/scisoft/share/iraf/iraf
[Catherine@localhost ~]$
is what comes up. When I open a terminal, it says "bash: PATH: command not found" - could I have done something wrong there?
This is exactly what I put in the .bashrc:
PATH = $PATH:/home/Catherine/SciSoft/scisoft/bin
export PATH
Thanks for your help.
Mike Fitzpatrick wrote on Oct 07, 2006
Since the 'csh -x' output fails at the 'pushd' command I'd say the problem is that the definition of 'iraf' is wrong (e.g. should be /scisoft instead of /SciSoft?). You can rerun the install script to change the $iraf value, otherwise check the scisoft installation to see how this might have happened.
As for the 'PATH: command not found'...Try moving this command to the .profile (or maybe it's .bash_profile) file. Don't pay too much attention to me on the details, I'm a csh user, and given the above this might not be a path problem anyway.
Cheers,
-Mike
As for the 'PATH: command not found'...Try moving this command to the .profile (or maybe it's .bash_profile) file. Don't pay too much attention to me on the details, I'm a csh user, and given the above this might not be a path problem anyway.
Cheers,
-Mike
Shashikiran Ganesh wrote on Oct 07, 2006
fitz
Since the 'csh -x' output fails at the 'pushd' command I'd say the problem is that the definition of 'iraf' is wrong (e.g. should be /scisoft instead of /SciSoft?). You can rerun the install script to change the $iraf value, otherwise check the scisoft installation to see how this might have happened.
The latest scisoft does not require any installation apart from running /scisoft/bin/Setup.bash before using any of the programs included. If you have run /scisoft/bin/Setup.bash, then the definition of 'iraf' should be ok. However, I see from your .bashrc file that you are sourcing this file as
. /home/Catherine/SciSoft/scisoft/
I suggest you make a link from /home/Catherine/SciSoft/scisoft to /scisoft as follows:
ln -s /home/Catherine/SciSoft/scisoft /scisoft
This would have to be done as superuser (root/sudo).
gcardonav wrote on Oct 07, 2006
Hi I just reinstalled iraf in my computer. I did it with the scisoft package I got from my department. I been trying to login into iraf but I get nothing, here is what I get
Any ideas where my problem may lie.
Gus
locate .bashrc
/Applications/scisoft/packages/iraf/iraf/local/.bashrc
[roam-167-232:~] gcardonav% cd /Applications/scisoft/packages/iraf/iraf/local/
[roam-167-232:iraf/iraf/local] gcardonav% ls
COPYRIGHTS bugs.log lib mkpkg notes.v212 src
bin help.log login.cl notes.v211 notes.v214 uparm
[roam-167-232:iraf/iraf/local] gcardonav% cl
cl: Command not found.
[roam-167-232:iraf/iraf/local] % locate .bashrc
/Applications/scisoft/packages/iraf/iraf/local/.bashrc
[roam-167-232:iraf/iraf/local] % cat /Applications/scisoft/packages/iraf/iraf/local/.bashrc
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
[roam-167-232:iraf/iraf/local] % locate mkiraf
/Applications/scisoft/bin/mkiraf
/Applications/scisoft/packages/iraf/iraf/unix/hlib/mkiraf.csh
/usr/local/bin/mkiraf
[roam-167-232:iraf/iraf/local] % csh -x /Applications/scisoft/bin/mkiraf
/Applications/scisoft/bin/mkiraf: No such file or directory.
[roam-167-232:iraf/iraf/local] % Any ideas where my problem may lie.
Gus
Last post on Oct 07, 2006