CFITSIO mismatch

Skip to first unread message

Nov 25, 2021, 5:46:12 AM (6 days ago) Nov 25
to astrometry
I'm trying to solve an image and create a txt file with corr inside using the tablist command.
Unfortunately, during the procedure, astrometry returns this:

fitsio status = 104 could not open the named file

The image is solved, because when I open it, e.g. with SAO DS9, I'm able to retrieve the coordinates of the pixels. However, when I open the txt file with the corr I find:

"ERROR: Mismatch in the CFITSIO_SONAME value in the fitsio.h include file
that was used to build the CFITSIO library, and the value in the include file
that was used when compiling the application program:
   Version used to build the CFITSIO library   = 8
   Version included by the application program = 9

Fix this by recompiling and then relinking this application program
with the CFITSIO library."

How can i fix this?


Dustin Lang

Nov 25, 2021, 7:54:22 AM (6 days ago) Nov 25
to, astrometry

That's coming from the 'tablist' command.

The error message is telling you that one version of CFITSIO was used when compiling the code, and a different version is now found.

It's possible you have two different versions of the CFITSIO library on your computer and it's finding the wrong one.  You can see which one is being found by going:

$ which tablist
$ ldd $(which tablist) | grep cfitsio => /lib/x86_64-linux-gnu/ (0x00007fb9712f2000)

If you know that you have a different version of the library that you want to use, you can add that path to the (front of the) LD_LIBRARY_PATH variable, for example,

export LD_LIBRARY_PATH=/usr/local/cfitsio/lib:${LD_LIBRARY_PATH}

The code chooses which library to link against by using the 'pkg-config' command:

pkg-config --libs cfitsio

If you have compiled the code yourself, my guess is that your OS package manager upgraded the CFITSIO library, and you will have to re-compile the code (do a "make clean" first).

What OS are you using?


You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Gaetano Zarcone

Nov 25, 2021, 8:21:22 AM (6 days ago) Nov 25
to astrometry

Il Gio 25 Nov 2021, 14:01 Gaetano Zarcone <> ha scritto:
Hi Dustin,
I'm using Ubuntu 20.04.
Yes, CFTSIO library was upgraded by the OS. I compiled again code as suggested by you and it works.
Thank you very much Dustin.
Reply all
Reply to author
0 new messages