I want to add it as a shared library search path, but it is a workaround when I do not have permission.
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
I want to read the file contained in it.
Assuming there is "/home/username/usr/lib/XXXX.so" in the python file
import ctypes
ctypes.cdll.LoadLibrary('/home/username/usr/lib/XXXX.so')
If you forcibly read it once, it will be reused even when it is loaded in the library, so it will work.
import CaboCha
If you get angry because "libcabocha.so.5" is missing when you try to do
import ctypes
ctypes.cdll.LoadLibrary('/home/username/usr/lib/libcabocha.so.5')
import CaboCha
It works safely with.
Recommended Posts