Building Astrometry.net 0.46 on CentOS 6.5

March, 2014

Assumptions

  1. You have a system running CentOS 6.5 for x86-64.
  2. You are 'root' on this system.
  3. This system has been set up as a Software Development Workstation, minimally meaning that the compilers are installed.

System Prep

  1. yum -y install netpbm netpbm-devel libjpeg libjpeg-devel numpy cairo-devel fontconfig-devel libXrender-devel xorg-x11-proto-devel zlib-devel

Installing cfitsio

  1. Download the latest version of cfitsio - at present, cfitsio3360.tar.gz.
  2. tar zxvf cfitsio*.tar.gz
  3. cd cfitsio
  4. ./configure --prefix=/usr
  5. make
  6. make install
  7. ln -s /usr/lib/pkgconfig/cfitsio.pc /usr/lib64/pkgconfig/cfitsio.pc
  8. cd ..

Installing pyfits

  1. Download at least version 3.1 of pyfits - at present, pyfits-3.2.tar.gz.
  2. tar zxvf pyfits*.tar.gz
  3. cd pyfits
  4. python setup.py install
  5. cd ..

Installing astrometry.net

  1. Download the latest version of astrometry.net - at present, astrometry.net-0.46.tar.bz2
  2. tar jxvf astrometry.net-*.tar.bz2
  3. cd astrometry.net/util/
  4. Edit 'makefile.netpbm'
    • NETPBM_INC ?= -I/usr/include/netpbm
    • NETPBM_LIB ?= -L/usr/lib64 -lnetpbm
  5. cd ..
  6. make
  7. make extra
  8. make install
  9. Download either the wide-angle or the more detailed index files.
  10. Place the index files in /usr/local/astrometry/data

Testing

  1. export PATH=${PATH}:/usr/local/astrometry/bin
  2. cd demo
  3. solve-field apod1.jpg

Common Error #1

KeyError: "Keyword 'REMLINEN' not found."

This means a newer version of pyfits is needed. The EPEL repo has 2.4.0, and 3.1.0+ is needed. I don't know where to find a newer pyfits RPM, so I installed pyfits outside the package management system in the directions above. There are undoubtedly other ways of installing pyfits that would also work.


Common Error #2

cairoutils.c:728:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images
*** longjmp causes uninitialized stack frame ***: /usr/local/astrometry/bin/plotxy terminated

When seen while running solve-field, often just before a stack trace, this means that astrometry.net was built without Netpbm support. Make sure you have Netpbm installed and that you have modified makefile.netpbm accurately and with the correct paths to the Netpbm headers and libraries.