Building Astrometry.net 0.46 on CentOS 6.5
March, 2014
Assumptions
- You have a system running CentOS 6.5 for x86-64.
- You are 'root' on this system.
- This system has been set up as a Software Development Workstation, minimally meaning that the compilers are installed.
System Prep
yum -y install netpbm netpbm-devel libjpeg libjpeg-devel numpy cairo-devel fontconfig-devel libXrender-devel xorg-x11-proto-devel zlib-devel
Installing cfitsio
- Download the latest version of cfitsio - at present, cfitsio3360.tar.gz.
tar zxvf cfitsio*.tar.gz
cd cfitsio
./configure --prefix=/usr
make
make install
ln -s /usr/lib/pkgconfig/cfitsio.pc /usr/lib64/pkgconfig/cfitsio.pc
cd ..
Installing pyfits
- Download at least version 3.1 of pyfits - at present, pyfits-3.2.tar.gz.
tar zxvf pyfits*.tar.gz
cd pyfits
python setup.py install
cd ..
Installing astrometry.net
- Download the latest version of astrometry.net - at present, astrometry.net-0.46.tar.bz2
tar jxvf astrometry.net-*.tar.bz2
cd astrometry.net/util/
- Edit 'makefile.netpbm'
NETPBM_INC ?= -I/usr/include/netpbm
NETPBM_LIB ?= -L/usr/lib64 -lnetpbm
cd ..
make
make extra
make install
- Download either the wide-angle or the more detailed index files.
- Place the index files in /usr/local/astrometry/data
Testing
export PATH=${PATH}:/usr/local/astrometry/bin
cd demo
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.
|