0

Here I am trying to import 'libEpsonFiscalDriver.so' file on a Raspberry Pi using Python 2.7. Here are my steps in python:

import ctypes
ctypes.cdll.LoadLibrary('/home/pi/odoo/my_module/escpos/lib/libEpsonFiscalDriver.so')

When I run this, I get the error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/ctypes/__init__.py", line 443, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/pi/odoo/my_module/escpos/lib/libEpsonFiscalDriver.so: cannot open shared object file: No such file or directory

Extra Information: Header Information of libEpsonFiscalDriver.so file.

$ readelf -h libEpsonFiscalDriver.so 

ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x5de0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          125176 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         29
  Section header string table index: 26

Any help will be more than appreciated! Thank you.

3
Machine:                           Intel 80386

This shared library object (.so) was compiled for the x86 instruction set, used predominantly on 32-bit PC style computers with Intel or AMD processors. All Raspberry Pi models use some variant of ARM, which is common in mobile devices. They are not compatible.

You either have to get the source code and compile it yourself, or else find a version compiled for ARMv6 or 7 (Pi 2 and 3 only). Since it looks to be a proprietary printer driver, chances are this is not possible, so you are out of luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.