Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

source irafuser.csh leads to undefined variable Unbuntu

 
Post new topic   Reply to topic    iraf.net Forum Index -> Systems
View previous topic :: View next topic  
Author Message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:01 pm    Post subject: source irafuser.csh leads to undefined variable Unbuntu Reply with quote

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 here

http://geco.phys.columbia.edu/~rubab/iraf/iraf_step_by_step_installation

everything was going fine until I got this step.

Code:
cd /iraf/iraf/unix/hlib

source irafuser.csh


I changed directories and typed

Code:
source irafuser.csh


which gave this error message

Code:
iraf: Undefined variable.


I tried typing the full path name after source and got the same message. I then tried
Code:
sudo /home/iraf/unix/hlib/irafuser.csh


and got a : command not found error. Can someone explain to me where I am going wrong.
thank you
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Jun 23, 2011 8:08 pm    Post subject: Reply with quote

Try doing a

Code:
setenv iraf /iraf/iraf/


(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
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:24 pm    Post subject: Reply with quote

Fitz

I tried
Code:
 /source irafuser.csh
as well as

Code:
 ./source irafuser.csh


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:
sudo chown -R iraf:iraf /iraf


I got

Code:
chown: cannot access `/iraf': No such file or directory


but
Code:
 sudo chown -R iraf:iraf /home/iraf


worked
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:27 pm    Post subject: Reply with quote

I just looked at the setting under users and groups, and it looks like I set /home/iraf as the iraf home directory.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Jun 23, 2011 8:29 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:35 pm    Post subject: Reply with quote

I will give it a try. How can one tell if it is a C-shell or Bash shell? Thanks
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Jun 23, 2011 8:39 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:45 pm    Post subject: Reply with quote

nothing seems to be happening. this is what I typed

Code:

ubuntu:~/unix/hlib> csh
ubuntu:~/unix/hlib> source irafuser.csh
ubuntu:~/unix/hlib>


then tried
Code:

ubuntu:~/unix/hlib> source /home/iraf/unix/hlib/irafuser.csh
ubuntu:~/unix/hlib>
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Jun 23, 2011 8:47 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:49 pm    Post subject: Reply with quote

fitz wrote:
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.


I got

/bin/tcsh

which I now remember is what the instructions I am following said to set it as
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:54 pm    Post subject: Reply with quote

fitz wrote:
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.


okay thank you.
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 8:56 pm    Post subject: Reply with quote

It says that the script must be run as root for changes to take effect. To do that I just type

Code:
root ./install


correct?
Back to top
View user's profile Send private message
surfcast23
Active IRAF User


Joined: 23 Jun 2011
Posts: 24

PostPosted: Thu Jun 23, 2011 9:00 pm    Post subject: Reply with quote

never mind remembered what to do
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Systems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.15 seconds