0

I don't have much experience with Linux OS.

I managed to use ctypes in Python to access a function in Digital Persona SDK DLL file using this code:

import ctypes
dpfjDll = ctypes.CDLL("dpfj.dll")
.....

Testing of calling the function worked perfectly on my windows machine, but when I deployed the app to our linux server, I got the following error:

OSError: dpfj.dll: cannot open shared object file: No such file or directory

Any idea what is going on?

Update: I tried for testing to set the absolute path temporarily for the file, and now I am getting this error message:

OSError: /home/......./main/helper/dpfj.dll: invalid ELF header
Adel Khayata
  • 2,717
  • 10
  • 28
  • 46

1 Answers1

0

I fixed the problem by installing Digital Persona SDK on our Linux server and used the following code for loading the library:

import ctypes
dpfjDll = ctypes.CDLL("libdpfj.so.3.1.0")
Adel Khayata
  • 2,717
  • 10
  • 28
  • 46
  • Could you share your interface? It looks pretty awesome. – grouser May 04 '22 at 15:46
  • 1
    I don't have a full interface, but this is the link for the compare function in python: https://github.com/adelkhayata/misc/blob/main/digital_persona_python_interface.py – Adel Khayata May 07 '22 at 04:55
  • Many thanks. Have you managed to do the enrolment from Python? – grouser May 09 '22 at 15:32
  • Unfortunately, I only did the compare, because it is a little bit hard to map python to the DP C library ( I already have enrolment working in our legacy .NET app ) – Adel Khayata May 10 '22 at 06:28