Fits to Jpeg Conversion Using Funpack (cfitsio) package

I am trying to convert the Fits compressed file image, which is in (.fz) format, to a jpeg image for the annotation process. So for this, we want to use funpack for which we need to install cfitsio; we installed the library and used make to build it, but on windows funpack does not work; we tried on Linux, but after setting all paths we get an error


The process is as follows:

  1. decompress .fz to .fitz
  2. fitz to wavelet_fitz
  3. wavelet_fitz to wavelet_ppm
  4. wavelet_ppm to jpeg
    So there is an error as to the libcfitsio.so.10 not found or not executable. We tried different approaches as adding the library path (environment) to library_path and generating a pointer to the path still the error remains.
    I need help understanding how to solve the error on my Linux 22.04 system.
    Or is there any other library or method to decompress and convert the .fz to jpeg with a good conversion ratio which I can implement in my python code?
    Kindly assist!