View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Can’t install IRAF on Linux Mint 64-bit because of a “bad interpreter” error and no vocl.e bi…

andrej wrote on Dec 17, 2015


Greetings.

I am trying to install IRAF on Linux Mint 17.3. I used the directions on the following webpage as a guide:

http://www.iac.es/sieinvens/siepedia/pmwiki.php?n=HOWTOs.IrafMacOSX

The tar file that I used is:

ftp://iraf.noao.edu/iraf/v216/PCIX/iraf.lnux.x86_64.tar.gz

So, I unpacked that, and ran the following commands without error:

export iraf="/iraf/iraf/"

sudo /iraf/iraf/install --system

cd /iraf/iraf/extern/

sudo ./configure

sudo make check

sudo make fitsutil mscred mscdb stecf tables stsdas ...

cd ~/

mkdir iraf ; cd iraf

mkiraf

But then when I type cl, I receive the following error message:

/usr/local/bin/cl: /iraf/iraf//unix/hlib/irafarch.csh: /bin/csh: bad interpreter: No such file or directory

ERROR: No /iraf/iraf//bin./vocl.e binary found.

What's going on?

Mike Fitzpatrick wrote on Dec 17, 2015


Looks like you need to install 'tcsh' to have a valid C-shell.


andrej wrote on Dec 17, 2015


How do I do that?

Mike Fitzpatrick wrote on Dec 17, 2015


Try:

% sudo apt-get install csh tcsh


andrej wrote on Dec 17, 2015


I received the following error message:

E: Invalid operation csh

Mike Fitzpatrick wrote on Dec 17, 2015


Then try just "sudo apt-get install tcsh" instead. I don't run Mint so I don't know specifically what the package name is. The point, however, is that you need to install a C-shell in the OS.

andrej wrote on Dec 17, 2015


Something happened... I thought that I included the word "install" because I tried it like 5 times and I kept getting that E: error message.

Well I just tried it again and it did something different.

When I enter

sudo apt-get install csh tcsh

it doesn't do anything, it just enters it, and a new % line appears.

When I enter

sudo apt-get install tcsh

the same thing happens. It doesn't appear that any processes take place.

Mike Fitzpatrick wrote on Dec 17, 2015


If there is a /bin/csh command on your machine it just means the install worked and subsequent commands didn't need to do anything. Does the 'cl' command now work?

andrej wrote on Dec 17, 2015


No. When I type cl, I receive the following error message:

/usr/local/bin/cl: /iraf/iraf//unix/hlib/irafarch.csh: /bin/csh: bad interpreter: No such file or directory

ERROR: No /iraf/iraf//bin./vocl.e binary found.

Mike Fitzpatrick wrote on Dec 17, 2015


Is there a /usr/bin/csh instead? If so, you can make a /bin/csh link with

% sudo ln -s /usr/bin/csh /bin/csh

and the paths should resolve.

IRAF v2.16 should work with just a Bourne shell but the C-shell files are still available. Use "echo $SHELL" to see what shell your user account is currently using.


andrej wrote on Dec 17, 2015


The folder

/usr/bin/csh

does not exist.

I tried entering

sudo ln -s /usr/bin/csh /bin/csh

and then typing

cl

I still get the same error message.

When I enter

echo $SHELL

it returns

/bin/bash

andrej wrote on Dec 17, 2015


I will be out of the office where the machine is stationed, for a few days, so let's pick up with this again on Monday.


andrej wrote on Dec 21, 2015


Greetings again. I will be in today but then out of the office (and away from this computer) until mid-January.

So, what's the following step to get this to work?

Mike Fitzpatrick wrote on Dec 21, 2015


Fundamentally, the problem is that you need to install a C-shell in the OS and for some reason the 'apt-get' command isn't working. That's an issue for another forum or some Googling on your part.

IRAF-wise, the 'cl' command is being installed as a Bash script, but it appears that within that script lines 95-98 read:


    if [ -e $iraf/unix/hlib/irafarch.csh ]; then
        MACH=`$iraf/unix/hlib/irafarch.csh`
    else
        MACH=$os_mach
 


So instead of sourcing the Bash version of the 'irafarch' command it looks for the C-shell version. Simply editing this script to change the 'csh' to a 'sh' should fix the problem. There are similar crossovers between shells where the Bash version calls C-shell in

ecl.sh

vocl.sh

irafuser.sh

fc.sh

These should also be edited to change the 'csh' extension to 'sh'. All of these files live in the $iraf/unix/hlib directory.

andrej wrote on Dec 21, 2015


So I got apt-get to work, I think that it was a shaky wireless connection that seemed to cause the issue.

I was able to install tcsh and csh.

So, when I go to type

cl

to launch IRAF, I receive a different error message:

bad type spec `s' in `/222&'

bad type spec `i' in `C'

must specify at least name,type,mode for `pic:StandardsBiryukov+:1998)'

bad spec type `j' in `C'

ERROR: cannot read parameter file `vo$vo.par'

called as: `cl ()'

Error while reading login.cl file - may need to rebuild with mkiraf

Fatal startup error. CL dies.

The only issue that I saw in the prompt window while installing csh was with scrollkeeper, but I'm not sure what that has to do with this.

Mike Fitzpatrick wrote on Dec 21, 2015


Looks like a parameter file or uparm directory was corrupted somehow. Try doing a new MKIRAF and reinitialize your uparm directory, if you see the same errors then try reinstalling from the tarball, that text is not part of the normal iraf distribution.

andrej wrote on Dec 21, 2015


So here is an update. I deleted the old and new login.cl files, restarted the Terminal, re-did

mkiraf

then entered cl again, and this time I got a different error message:

ERROR: cannot open `uparm$22826' for writing

called as: `cl ()'

Error while reading login.cl file - may need to rebuild with mkiraf

Fatal startup error. CL dies.

I will attempt to do a fresh install from the tarball and see what happens.

andrej wrote on Dec 21, 2015


Hey it works finally.

So I'm guessing that before I install IRAF, tcsh and csh need to be installed first, or else I would end up going through this whole ordeal again, correct?

During the install, under Editing Paths, the following double error message appeared:

/iraf/iraf/install: line 1006: ((: 0=0 : attempted assignment to non-variable (error token is "=0 ")

*** Cannot

/iraf/iraf/install: line 1006: ((: 0=0 : attempted assignment to non-variable (error token is "=0 ")

*** Cannot

I'm not sure if that matters.

Last post on Dec 21, 2015