View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Problem during installation of external packages in Mac running High Siera

evertonbt wrote on Oct 10, 2017


Hi, its my first time here.

I looked almost everywhere and I didn't find a solution for my problem:

I cannot download any packages from http://iraf.noao.edu using Safari (I can do it using another web browser). But this is an easy issue to avoid.

The installation for user sounds working nicely - Iraf seems to be working too, but it hasn't the external packages installed for default. So I tried to follow the instructions, using the ./configure into the extern directory, to work with the packages I need, and the results are always:

 
sudo ./configure 
Password:
Initializing repository data ....
Cannot download repository manifest file, quitting.
Creating system makefile ....
Setup Complete.
cat: .repo_pkgs: No such file or directory


    To install packages, use 'ls' to list the currently available
    packages from the IRAF repository.  For each package you wish
    to install, use the command:

      make <pkg>

    The package will be loaded dynamically the next time you start
    the CL session.

    Use the commmands:

      make update       # to update pkgs to the latest repository version
      make check        # to list available updates
      make clean        # to delete installed all packages
      make init         # restore to pre-configure state
      make <pkg>        # to force a re-install of named <pkg>

 


For some reason, i couldn't find, it cannot connect to the repositories, like Safari couldn't. May be it is a correlated issue.

Another thing is that the repositories seems to be working too.

It started since may computer updated to High Sierra.

Someone has any idea how I could solve this.

Thanks,

Everton

evertonbt wrote on Oct 10, 2017


I forgot to say I`m using the latest version of Iraf.

I found some people talking abou a flag -A in the file ../util/pkgget. (https://iraf.net/forum/viewtopic.php?forum=6&amp;showtopic=1466909&amp;highlight=external%20packages)

But it`s not the case.

Mike Fitzpatrick wrote on Oct 16, 2017



So it turns out that the DYLD_LIBRARY_PATH recommendation is needed for the correct libraries to resolve for X11IRAF, but XQuartz provides it's own libPng.dylib that conflicts with the one in the system library, the script that does the downloads using the x_system,e binary then fails with the error you report.

If you added the DYLD_LIBRARY_PATH to one of your startup files the quick fix is to simply unset it from your environment before you run the 'configure' command.

Also, instead of defining the DYLD_LIBRARY_PATH in startup files, you can apply it only to the X11IRAF tools using an alias such as:

alias xg="(export DYLD_LIBRARY_PATH=/usr/X11/lib && xgterm)" # (for Bash users)

or

alias xg "(setenv DYLD_LIBRARY_PATH /usr/X11/lib ; xgterm)" # (for C-shell users)

anthonyvun wrote on Nov 16, 2017


I am having the same problem when updating it to High Sierra.

I don't understand the answered reply previously by @fitz. Can you clarify what steps I should perform?

Thank you in advance

Anthony

evertonbt wrote on Nov 16, 2017


Quote by: anthonyvunI am having the same problem when updating it to High Sierra.

I don't understand the answered reply previously by @fitz. Can you clarify what steps I should perform?

Thank you in advance

Anthony


Hi Anthony,

I think he is talking about some hidden files in the folder you create a login.cl (using mkiraf), in my case it is in my user file.

You may list them typing:

 ls -a


But, I don't know, i couldn't solve it anyway... the only way, for now, was doing a install using conda by:



conda create -n iraf27 python=2.7 iraf-all pyraf-all stsci
conda install -c pkgw/label/superseded pyraf

 


Please, see these links:

http://astroconda.readthedocs.io/en/latest/installation.html

https://anaconda.org/pkgw/pyraf


Mike Fitzpatrick wrote on Nov 17, 2017



The simplest and most general fix is to replace the 'ftp' binary/functionality that was removed in High Sierra, e.g. you can get a Sierra binary from

ftp://iraf.noao.edu/iraf/v216/support/macintel/ftp

Download this in binary mode and then put it someplace like /usr/local/bin (because the SIP restrictions now mean you can't normally write it back to /usr/bin even with 'sudo'). The second step is to edit the $iraf/util/pkgget script to change the path for the 'dlcmd' variable from '/usr/bin/ftp' to '/usr/local/bin/ftp', i.e. on line 68 change it to read

dlcmd='/usr/local/bin/ftp'

It may be possible to create an alias or function that uses /usr/bin/curl to do what the 'ftp' command does, but the instructions are also likely to be more error prone. Other workarounds likewise require and update to the utility scripts that would require additional instructions.

Because /usr/bin/ftp doesn't exist on High Sierra, the scripts fall back to use the iraf x_system.e binary to retrieve a URL. The earlier commend referred to this binary failing when the DYLD_LIBRARY_PATH was set to fix a problem in starting up XGterm, however I can also see that the x_system.e binary appears to execute but produces no file and will have to investigate separately.

Ole Streicher wrote on Nov 17, 2017


I filed this as issue #114 in the github repository.

Wouldn't it be better to fix all the problems in the code and to create a new IRAF version that just works on modern platforms, instead of stacking workaround on workaround and sometimes even ignore the problems?


Ole Streicher wrote on Nov 18, 2017


Instead of fiddling around with the "ftp" executable and /usr/bin/ protection, you can also replace the file util/pkgget with the latest development version of the file, which can be downloaded here:

https://raw.githubusercontent.com/olebole/iraf-v216/replace_ftp_by_curl/util/pkgget

The change is rather trivial (just using curl -O on all systems), which works on older systems as well.


anthonyvun wrote on Nov 20, 2017


So I've done both methods as suggested by @fitz and @olebole

Fitz result gave me similar comments as before

Initializing repository data ....

Cannot download repository manifest file, quitting.

Creating system makefile ....

Setup Complete.

cat: .repo_pkgs: No such file or directory


Olebole result gave me the following comment

Initializing repository data ....

/iraf/iraf/extern/../util/pkginit: /iraf/iraf/extern/../util/pkgget: /bin/bash\: bad interpreter: No such file or directory

Cannot download repository manifest file, quitting.

Creating system makefile ....

Setup Complete.

cat: .repo_pkgs: No such file or directory


Any thoughts? - Still can't be fixed


anthonyvun wrote on Nov 20, 2017


Oh sorry! @Olebole's method actually worked!

- I found I defined something wrongly

Thank you so much! Finally the long weekend struggle is gone

Last post on Nov 20, 2017