surfcast23 |
06/23/2011 08:01PM (Read 6270 times)
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
Hi all. I am new to unix as well as IRAF so please bear with me. I was following the directions for Unbuntu install found herehttp://geco.phys.columbia.edu/~rubab/iraf/iraf_step_by_step_installationeverything was going fine until I got this step.[code:1:2ac1f2b1ea]cd /iraf/iraf/unix/hlibsource irafuser.csh[/code:1:2ac1f2b1ea]
I changed directories and typed [code:1:2ac1f2b1ea]source irafuser.csh[/code:1:2ac1f2b1ea]which gave this error message[code:1:2ac1f2b1ea]iraf: Undefined variable.[/code:1:2ac1f2b1ea]I tried typing the full path name after source and got the same message. I then tried
[code:1:2ac1f2b1ea]sudo /home/iraf/unix/hlib/irafuser.csh
[/code:1:2ac1f2b1ea]and got a : command not found error. Can someone explain to me where I am going wrong.
thank you
|
|
|
|
fitz |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Try doing a[code:1:3e3e02fffe]setenv iraf /iraf/iraf/[/code:1:3e3e02fffe](trailing '/' is required) before the source command. To simply use iraf you don't need to do either of these steps, they are mostly needed for development or e.g. to build external packages. I think your 'sudo' command is failing because you used the /home/iraf path instead of /iraf/iraf
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
Fitz I tried
[code:1:3a0e96abb3] /source irafuser.csh [/code:1:3a0e96abb3] as well as[code:1:3a0e96abb3] ./source irafuser.csh[/code:1:3a0e96abb3]as well as what you suggested. When I did the setenv nothing happened at all, and I got the error messages when I retried source.I am using /home/iraf/ because earlier in the install when I tried[code:1:3a0e96abb3]sudo chown -R iraf:iraf /iraf[/code:1:3a0e96abb3] I got [code:1:3a0e96abb3]chown: cannot access `/iraf': No such file or directory
[/code:1:3a0e96abb3]but
[code:1:3a0e96abb3] sudo chown -R iraf:iraf /home/iraf
[/code:1:3a0e96abb3]worked
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
I just looked at the setting under users and groups, and it looks like I set /home/iraf as the iraf home directory.
|
|
|
|
fitz |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
If /home/iraf is where you actually unpacked the files then that is what you should use. 'source' is a C-shell command and is used to load the definitions in the irafuser.csh file, however this presumes that you are using a C-shell at the time and not a Bash shell. If this is the problem, type 'csh' before running the source/setenv commands.
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
I will give it a try. How can one tell if it is a C-shell or Bash shell? Thanks
|
|
|
|
fitz |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Try "echo $SHELL" Or, if you get lots of errors or a 'command not found' message from doing the 'source' then you're probably in a Bash shell.
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
nothing seems to be happening. this is what I typed[code:1:015b2a6f75]
ubuntu:~/unix/hlib> csh
ubuntu:~/unix/hlib> source irafuser.csh
ubuntu:~/unix/hlib>[/code:1:015b2a6f75]then tried
[code:1:015b2a6f75]
ubuntu:~/unix/hlib> source /home/iraf/unix/hlib/irafuser.csh
ubuntu:~/unix/hlib>
[/code:1:015b2a6f75]
|
|
|
|
fitz |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
That's all normal -- there is no output, all it does is define some environment variables. Like I said, its not needed for simply using the system by most users.
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
[quote:05d6951eac="fitz"]Try "echo $SHELL" Or, if you get lots of errors or a 'command not found' message from doing the 'source' then you're probably in a Bash shell.[/quote:05d6951eac]I got /bin/tcsh which I now remember is what the instructions I am following said to set it as
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
[quote:28145c4079="fitz"]That's all normal -- there is no output, all it does is define some environment variables. Like I said, its not needed for simply using the system by most users.[/quote:28145c4079]okay thank you.
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
It says that the script must be run as root for changes to take effect. To do that I just type[code:1:ccdc6ab50e]root ./install[/code:1:ccdc6ab50e]correct?
|
|
|
|
surfcast23 |
06/23/2011 08:01PM
|
|
|
Status: offline
Registered: 06/23/2011
Posts: 24
|
never mind remembered what to do
|
|
|
|