I'm failing to get MariaDB Connecter/C and the mariadb python package properly installed and cooperating on an NVIDIA Jetson AGX Xavier. Apparently the .so
files ends up in a location where the python package cannot find it. How can I correct this? Here are the steps I'm currently taking...
- Download and untar the source tarball from here.
- Build and install MariaDB Connector/C
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
make
sudo make install
This installs the library files in /usr/local/lib/mariadb
.
gatekeeper@gatekeeper-agx02:/usr/local/lib/mariadb$ ls
libmariadbclient.a libmariadb.so libmariadb.so.3 plugin
- Install the python package
pip install mariadb
Then, when I start python and try to import the mariadb package I get this error:
gatekeeper@gatekeeper-agx02:~$ python
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mariadb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/gatekeeper/.local/lib/python3.6/site-packages/mariadb/__init__.py", line 10, in <module>
from ._mariadb import (
ImportError: libmariadb.so.3: cannot open shared object file: No such file or directory
How can I change the library installation directory (and to what path name?) or point the python package the correct location?