View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Iraf installation problems on Fedora Linux

Bimal wrote on Nov 29, 2007

I am trying to install IRAF on Fedora. I was logged as a root user, followed the installation guide, but after making ./install-iraf, I got the following message:
./install-iraf: Permission denied
When I was doing the same procedure on Mandrake 10.1 it worked out all fine, but here on Fedora something is wrong?!
Can someone please help me?

Mike Fitzpatrick wrote on Nov 29, 2007

'Install-iraf' is not a script we distribute, so this is likely some other distribution. The simple answer is, just make the script executable before running it:

% chmod 755 ./install-iraf
% ./install-iraf


-Mike

Bimal wrote on Nov 29, 2007

I did this and I've got the following answer:

-bash: ./install-iraf: /bin/csh: bad interpreter: No such file or directory

What no?

Mike Fitzpatrick wrote on Nov 29, 2007

It means you need to install tcsh/csh on your machine. The script is a C-shell script, but you only have Bash available on your machine. You'll need C-shell for other IRAF scripts (e.g. 'cl', 'mkiraf', etc) anyway.

-Mike

Bimal wrote on Nov 29, 2007

Since I am not such a good administrator some help for installing tcsh/csh would be very much appreciated. Thanks for the help so far as well.

Mike Fitzpatrick wrote on Nov 29, 2007

The exact version will depend on what version of Fedora you're running, but you need to find a "tcsh-<someversion>.rpm" file and install with

# rpm -i tcsh.rpm


Do this as the 'root' user.

-Mike

Bimal wrote on Nov 29, 2007

Hi Mike, I am running Fedora 8. Where is this file you are mentioning located?

Mike Fitzpatrick wrote on Nov 29, 2007

In Fedora 8, as 'root' type the command

 # yum install tcsh 


It will be installed from the net.

-Mike

Bimal wrote on Nov 29, 2007

Thank you mike. The IRAF installation worked out, after I did the

# yum install tcsh

Now, the only problem is that after the installation I want to make it start. As a normal user I wanted to do "mkiraf" and I got the following answer:

Error: current directory is not an iraf user login directory

Normally "mkiraf" is done as a local user. I don't know why he wants me to be an iraf user?

Mike Fitzpatrick wrote on Nov 29, 2007

It means you're trying to run MKIRAF from within an iraf source tree directory ( not allowed except for $iraf/local). You should try it again while logged in as yourself from your own home directory.

-Mike

Bimal wrote on Nov 29, 2007

Hi, I did try again as a local user and it worked. So, I went through the the process bellow:
Initialize uparm? (y|n): y
-- initializing uparm
Terminal types: xgterm,xterm,gterm,vt640,vt100,etc.
Enter terminal type: xgterm
A new LOGIN.CL file has been created in the current directory.
You may wish to review and edit this file to change the defaults.


After that I wanted it to start the program with "cl", and again some problems arised:
[Bimal@localhost ~]$ cl
/iraf/iraf/bin.redhat/cl.e: Permission denied.


Now, I really don't know what to do anymore?

Mike Fitzpatrick wrote on Nov 29, 2007

As I said, I don't know what distribution you're using that includes a script called 'install-iraf', it isn't something we've done. So, I can't comment specifically on problems with a particular distribution.

However, the error means that the CL binary doesn't have the proper permissions to be executed, I assume the same is true for the other binaries in the system as well. This may be retricting access to users other than 'iraf' or to all users, I can't tell. In any case, the following commands should fix it. Run these as either 'root' or 'iraf' if that's who owns the files:


% cd /iraf/iraf/bin.redhat ; chmod 755 *.e
% cd /iraf/iraf/noao/bin.redhat ; chmod 755 *.e
% cd /iraf/iraf/unix/bin.redhat ; chmod 755 *.e


Since you're able to at least see the file I'm assuming there aren't any intervening path permission problems.

Cheers,
-Mike

Bimal wrote on Nov 29, 2007

Mike, thank you. You are wonderful. Now things are working. Slowly I am learning...
Do you know how to install ds9 since here on fedora 8 seems to be no ds9 viewer, since I got the message:

cl> !ds9&
ds9: Command not found.
[1] 3491
[1] Exit 1 ds9

Normally in my previous linux distribution this was already included in the basic package.

Cheers, Bimal

Mike Fitzpatrick wrote on Nov 29, 2007

You install DS9 simply by putting the binary in a directory such as /usr/local/bin, or any other directory in your path. When you execute it using a '!' escape from the CL, a shell is created to execute the command. If you get a 'command not found' message it means the shell created doesn't contain a path that contains the directory where you installed DS9. This usually happens if you define the path in your .login file instead of your .cshrc file.

Note that starting with something explicit like 'cl> !/usr/local/bin/ds9 &' will also work.

Cheers,
-Mike

Bimal wrote on Nov 29, 2007

Hi Mike,
I was trying as you proposed:

cl> !/iraf/x11iraf/bin/ds9 &
[1] 6020
cl> /iraf/x11iraf/bin/ds9: Permission denied.


So, it looks like there is some other problem maybe?

Mike Fitzpatrick wrote on Nov 29, 2007

Add execute permissons using:

% chmod 755 /iraf/x11iraf/bin/ds9


-Mike

Bimal wrote on Nov 29, 2007

Hi, it seems that things are still not ready to function properly. I did change the mod, as you told me. Now the following problem arised:


cl> !/iraf/x11iraf/bin/ds9&
[1] 3223
cl> ds9: dynamic-link.h:62: elf_get_dynamic_info: Assertion `! "bad dynamic tag"' failed.


Mike Fitzpatrick wrote on Nov 29, 2007

Most likely there is some sort of incompatability with the DS9 binary itself. Was this part of the same mysterious distribution you're using or did you get it from the SAO site directly? If the former, I'd recommend getting a fresh binary from ftp://sao-ftp.harvard.edu/pub/rd/ds9 If the latter, try one of the other linux binaries from there.

You might also try the unix command "ldd /path/ds9" to see if it complains about any missing shared library versions.

-Mike

Bimal wrote on Nov 29, 2007

Hi Mike,
Thank you very much for your help. I have downloaded a new DS9 and now it is working. Now I have started making stellar spectra analysis in IRAF. First I change the *.fts files to *.imh files so that they are ready for working with APALL. I do this with:

cl> rfits ima0001.fts * ima0001.imh

PANIC in `/iraf/iraf/bin.redhat/x_dataio.e': Memory has been corrupted
cl>

As you can see I get the message, that memory has been corrupted. Consequently the *.imh file is useless and I can't work with it in APALL. Do you have any idea what is the problem?

Mike Fitzpatrick wrote on Nov 29, 2007

See http://iraf.net/phpBB2/viewtopic.php?t=85605&highlight=rfits+corrupted

Let me know if you still have problems. Note that you don't need to explicitly convert to IMH format images, IRAF can operate on the FITS files directly. You can reset your 'imtype' variable in your login.cl file to create output FITS image by default by setting it to 'fits' and logging back in.

-Mike

Bimal wrote on Nov 29, 2007

I did the same 'procedure and now it's fine. Yet at every step here is a problem with this Fedora...
I was trying to display the .imh file on ds9 and look what I got:

cl> display ima0001.imh
frame to be written into (1:4) (1): 1

PANIC in `/iraf/iraf/bin.redhat/x_tv.e': Memory has been corrupted
cl>

Another problem arised was when I was running apall after setting the parameters in epar apall,


ec> apall
List of input images (ima0001.imh):
Find apertures for ima0001? (yes):
Number of apertures to be found automatically (27):

PANIC in `/iraf/iraf/noao/bin.redhat/x_apextract.e': Memory has been corrupted
ec>

Mike Fitzpatrick wrote on Nov 29, 2007

If you're getting a 'memory corrupted' from every task it is almost always a sure sign of the 'stacksize problem'. Before you login to the CL, type

[code]% limit stacksize unlimited # for C-shell
or
% ulimit -s unlimited # if you use Bash
[code]

You can put this command in your .cshrc file or .profile/.bashrc to make it permanent. The 'cl' command should do this automatically as well, however it depends on the IRAF version you're using.

-Mike

Bimal wrote on Nov 29, 2007

Hi Mike, I fixed the problem as you told me. Next problem arrised. Apall is not working properly:

apall
List of input images (ima0001.imh):
Find apertures for ima0001? (yes): y
Number of apertures to be found automatically (27): y
Resize apertures for ima0001? (yes): y
Edit apertures for ima0001? (yes): y
server # XGTERM.GUI -- Default GUI for Xgterm, providing a standard graphics terminal
# emulation.

reset-server
appInitialize xgterm Xgterm {
Xgterm.objects: toplevel Gterm gterm
*allowShellResize: true
*gterm.warpCursor: true
*gterm.raiseWindow: true
*gterm.deiconifyWindow: true
}
createObjects
send gterm setGterm
activate
sre[]ssz[R]

Under that a long list of strange characters appear.

Mike Fitzpatrick wrote on Nov 29, 2007

It means you're not actually running an XGterm window, e.g. you're using an XTerm or something like a gnome-terminal started from the applications dock that doesn't support graphics. If you're using an XTerm you can type 'stty xtermjh' to reset the terminal type and try again (or rerun MKIRAF to change the default in your login.cl), otherwise be sure you have an XGTerm running and use it to login to IRAF.

-Mike

Bimal wrote on Nov 29, 2007

For sure I am running XGTERM. Still I did mkiraf again as a local user and a new login.cl file has been created. Still the same problem with strange characters...

Mike Fitzpatrick wrote on Nov 29, 2007

As far as I know, the ONLY time you see that output is if IRAF thinks you're using an XGterm window (and so that is the output it sends the terminal to draw the graphics), but the window itself is NOT an xgterm.

-Mike

Bimal wrote on Nov 29, 2007

You are right. There is something wrong. Look:

setting terminal type to xgterm...
timeout - terminal type set wrong? (`stty termtype' to reset)

NOAO PC-IRAF Revision 2.11.3 EXPORT Tue Oct 26 21:01:12 MST 1999
This is the EXPORT version of PC-IRAF V2.11 supporting most PC systems.

Welcome to IRAF. To list the available commands, type ? or ??. To get
detailed information about a command, type `help command'. To run a
command or load a package, type its name. Type `bye' to exit a
package, or `logout' to get out of the CL. Type `news' to find out
what is new in the version of the system you are using. The following
commands or packages are currently defined:

apropos guiapps. lists. plot. stsdas. utilities.
dataio. images. noao. proto. system.
dbms. language. obsolete. softools. tables.
cl>


So I typed:


cl> stty termtype
Warning: No entry in device capabilities file for device (termtype)
cl>


I am running IRAF V 2.11.

Mike Fitzpatrick wrote on Nov 29, 2007

IRAF V2.11 does not do the 'limit stacksize unlimited' thing automatically so you will need to do that yourself in your .cshrc file or on the commandline before starting the CL. I strongly recommend you update to the latest v2.14 especially if you plan to build any external packages (v2.11 support for Fedora is very limited).

The value 'termtype' is not valid, use 'xgterm' if you are indeed running an XGTerm window.

-Mike

Bimal wrote on Nov 29, 2007

Hi Mike, so, is there anything I can do to run xgterm properly, before I attempt to upgrade to V2.14?

Mike Fitzpatrick wrote on Nov 29, 2007

Just start an XGTerm window and login to the CL from that window. An 'stty' setting simply tells IRAF what kind of graphics code to emit, it WILL NOT start the XGterm for you.

-Mike

Bimal wrote on Nov 29, 2007

How do I start xgterm window before going to iraf?

Mike Fitzpatrick wrote on Nov 29, 2007

Assuming you have it installed on your system and it is in your default command path, type

% xgterm 


Log into the CL from the window that pops up.

-Mike

Bimal wrote on Nov 29, 2007

I have installed a new version of xgterm. I have it in:

/iraf/x11iraf/bin/xgterm

Now it is finally working. Thank you Mike.
So, how do I make it to run without typing all this long path? I have to go to my .bashrc? Where do I find this .bashrc?

Mike Fitzpatrick wrote on Nov 29, 2007

You can copy the binary to someplace that is already in your path (e.g. /usr/local/bin), or else add /iraf/x11iraf/bin to the 'path' or 'PATH' definitions in your .cshrc file (if you use C-shell) or .bashrc/.profile (if you use Bash). Both of these files will be in your initial unix login directory.

-Mike

Bimal wrote on Nov 29, 2007

Hi Mike, now finally everything (until I find something new?) is working fine. When I will have time I will upgrade it to V2.14. At that time I will again need some help from you.
Thank you again for everything!
Bimal

Last post on Nov 29, 2007