Im pretty confused right now since ctypes.CDLL() wont even find my library even though i have specified the absolute path to the library. Instead i get an error that says this:
Traceback (most recent call last):
File "/home/adde/test_buffer.py", line 10, in <module>
print(ctypes.CDLL(os.path.join(basepath, 'dlls', 'libmodsecurity.so.3.0.6')))
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libGeoIP.so.1: cannot open shared object file: No such file or directory
My python code is this:
from ctypes.util import find_library
import ctypes
import os
basepath = os.path.dirname(os.path.abspath(__file__))
dllpath = os.path.join(basepath, 'dlls', 'libmodsecurity.so')
print(ctypes.CDLL(os.path.join(basepath, 'dlls', 'libmodsecurity.so.3.0.6')))