Virtuoso database access

I have Virtuoso deployed to a managed server. I am trying to access the database via my application(.net core application) deployed in the same managed service, but I am getting the below error.
Error:
"Dependency unixODBC with minimum version 2.3.1 is required.\nUnable to load shared library ‘libodbc.so.2’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibodbc.so.2: cannot open shared object file: No such file or directory

I can access the virtuoso instance but from my application, I am the above error.
I would like to know the cause of this error. Thank you

The error message you’re encountering indicates that your .NET Core application is unable to find or load the libodbc.so.2 shared library, which is required for ODBC (Open Database Connectivity) operations. This issue is typically caused by the absence of the unixODBC package or the libodbc.so.2 library on your managed server.

Possible Causes:

  1. Missing unixODBC Package:
  • The unixODBC package, which provides the ODBC driver manager, is not installed on your server.
  1. Incorrect Library Path:
  • The libodbc.so.2 library is not in a directory that is included in the system’s library search path.
  1. Version Mismatch:
  • The version of unixODBC installed does not meet the minimum required version (2.3.1).

Steps to Resolve the Issue:

Step 1: Install unixODBC

Ensure that the unixODBC package is installed on your managed server. You can install it using the package manager for your operating system.

  • For Debian/Ubuntu:
sudo apt-get update
sudo apt-get install unixodbc
  • For Red Hat/CentOS:
      RDF-Turtle   JSON-LD   JSON   CSV   RDF/XML   Markdown   RSS   Atom Data format:sudo yum install unixODBC
  • For Fedora:
sudo dnf install unixODBC

Step 2: Verify the Installation

Check if the libodbc.so.2 library is present in the expected directory (usually /usr/lib or /usr/lib64).

ls /usr/lib/libodbc.so.2
ls /usr/lib64/libodbc.so.2

If the library is not found, you may need to create a symbolic link to the correct version:

sudo ln -s /usr/lib/libodbc.so.2.0.0 /usr/lib/libodbc.so.2

Step 3: Update the Library Path

Ensure that the directory containing libodbc.so.2 is included in the system’s library search path. You can do this by adding the directory to the LD_LIBRARY_PATH environment variable.

  • Temporarily (for the current session):
export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
  • Permanently (add to .bashrc or .profile):
echo 'export LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc

Step 4: Verify the Version

Ensure that the installed version of unixODBC meets the minimum required version (2.3.1).

odbcinst -j

This command will display the version of unixODBC installed. If the version is below 2.3.1, you may need to update it.

Step 5: Restart the Application

After making these changes, restart your .NET Core application to ensure that it picks up the new library path and dependencies.

Additional Debugging

If the issue persists, you can set the LD_DEBUG environment variable to get more detailed information about the library loading process.

export LD_DEBUG=libs
dotnet run

This will provide detailed output about the libraries being loaded and can help identify any further issues.

By following these steps, you should be able to resolve the error and successfully connect your .NET Core application to the Virtuoso database.

Thank you for the swift response @hwilliams , I will use this response to troubleshoot the server and revert accordingly.

Hello @hwilliams , I followed all the steps above, but the problem persists, I am still getting the same error message

Are you able to make a basic ODBC connection to any data source name using your setup?

/cc @hwilliams

No, does this mean the server is the issue? because I checked and verified that ODBC driver with its dependencies has been installed yet the connection can’t be established

How can it be a server issue when you cannot access unixODBC which is the client side ODBC driver manager to enable you to then access the Virtuoso server via its client side ODBC driver ?

Can you confirm what OS you are running on and to provide the output of the specific steps performed to proved unixODBC is installed and yet still get the same error ?

OS: Ubuntu 22.04.5 LTS
specific steps performed to prove unixODBC is installed:

  1. I ran this command odbcinst -j and this was the result below
    image

When you installed unixODBC did you verify that it works with any of your configured DSNs? You can’t even begin to use an ODBC client until this stage is passed.

/cc @hwilliams

No, I do not have any DSNs configured on the server, let me do this and test.

Also, have you confirmed that .Net can now actually locate the unixODBC libs, post verifying unixODBC is installed, as was detailed in my initial post ie

I don’t even understand the logs from the above command, after running

dotnet run

1799455: find library=libm.so.6 [0]; searching
1799455: search path=/usr/lib64/glibc-hwcaps/x86-64-v3:/usr/lib64/glibc-hwcaps/x86-64-v2:/usr/lib64/tls/x86_64/x86_64:/usr/lib64/tls/x86_64:/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64/x86_64:/usr/lib64/x86_64:/usr/lib64/x86_64:/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/glibc-hwcaps/x86-64-v3/libm.so.6
1799455: trying file=/usr/lib64/glibc-hwcaps/x86-64-v2/libm.so.6
1799455: trying file=/usr/lib64/tls/x86_64/x86_64/libm.so.6
1799455: trying file=/usr/lib64/tls/x86_64/libm.so.6
1799455: trying file=/usr/lib64/tls/x86_64/libm.so.6
1799455: trying file=/usr/lib64/tls/libm.so.6
1799455: trying file=/usr/lib64/x86_64/x86_64/libm.so.6
1799455: trying file=/usr/lib64/x86_64/libm.so.6
1799455: trying file=/usr/lib64/x86_64/libm.so.6
1799455: trying file=/usr/lib64/libm.so.6
1799455: search path=/usr/lib/glibc-hwcaps/x86-64-v3:/usr/lib/glibc-hwcaps/x86-64-v2:/usr/lib/tls/x86_64/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64/x86_64:/usr/lib/x86_64:/usr/lib/x86_64:/usr/lib (system search path)
1799455: trying file=/usr/lib/glibc-hwcaps/x86-64-v3/libm.so.6
1799455: trying file=/usr/lib/glibc-hwcaps/x86-64-v2/libm.so.6
1799455: trying file=/usr/lib/tls/x86_64/x86_64/libm.so.6
1799455: trying file=/usr/lib/tls/x86_64/libm.so.6
1799455: trying file=/usr/lib/tls/x86_64/libm.so.6
1799455: trying file=/usr/lib/tls/libm.so.6
1799455: trying file=/usr/lib/x86_64/x86_64/libm.so.6
1799455: trying file=/usr/lib/x86_64/libm.so.6
1799455: trying file=/usr/lib/x86_64/libm.so.6
1799455: trying file=/usr/lib/libm.so.6
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libm.so.6
1799455: trying file=glibc-hwcaps/x86-64-v2/libm.so.6
1799455: trying file=tls/x86_64/x86_64/libm.so.6
1799455: trying file=tls/x86_64/libm.so.6
1799455: trying file=tls/x86_64/libm.so.6
1799455: trying file=tls/libm.so.6
1799455: trying file=x86_64/x86_64/libm.so.6
1799455: trying file=x86_64/libm.so.6
1799455: trying file=x86_64/libm.so.6
1799455: trying file=libm.so.6
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libm.so.6
1799455:
1799455: find library=libexpat.so.1 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libexpat.so.1
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libexpat.so.1
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libexpat.so.1
1799455: trying file=glibc-hwcaps/x86-64-v2/libexpat.so.1
1799455: trying file=tls/x86_64/x86_64/libexpat.so.1
1799455: trying file=tls/x86_64/libexpat.so.1
1799455: trying file=tls/x86_64/libexpat.so.1
1799455: trying file=tls/libexpat.so.1
1799455: trying file=x86_64/x86_64/libexpat.so.1
1799455: trying file=x86_64/libexpat.so.1
1799455: trying file=x86_64/libexpat.so.1
1799455: trying file=libexpat.so.1
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libexpat.so.1
1799455:
1799455: find library=libz.so.1 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libz.so.1
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libz.so.1
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libz.so.1
1799455: trying file=glibc-hwcaps/x86-64-v2/libz.so.1
1799455: trying file=tls/x86_64/x86_64/libz.so.1
1799455: trying file=tls/x86_64/libz.so.1
1799455: trying file=tls/x86_64/libz.so.1
1799455: trying file=tls/libz.so.1
1799455: trying file=x86_64/x86_64/libz.so.1
1799455: trying file=x86_64/libz.so.1
1799455: trying file=x86_64/libz.so.1
1799455: trying file=libz.so.1
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libz.so.1
1799455:
1799455: find library=libc.so.6 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libc.so.6
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libc.so.6
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libc.so.6
1799455: trying file=glibc-hwcaps/x86-64-v2/libc.so.6
1799455: trying file=tls/x86_64/x86_64/libc.so.6
1799455: trying file=tls/x86_64/libc.so.6
1799455: trying file=tls/x86_64/libc.so.6
1799455: trying file=tls/libc.so.6
1799455: trying file=x86_64/x86_64/libc.so.6
1799455: trying file=x86_64/libc.so.6
1799455: trying file=x86_64/libc.so.6
1799455: trying file=libc.so.6
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libc.so.6
1799455:
1799455:
1799455: calling init: /lib64/ld-linux-x86-64.so.2
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libc.so.6
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libz.so.1
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libexpat.so.1
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libm.so.6
1799455:
1799455:
1799455: initialize program: /usr/bin/python3
1799455:
1799455:
1799455: transferring control: /usr/bin/python3
1799455:
1799455:
1799455: calling init: /usr/lib/python3.10/lib-dynload/_json.cpython-310-x86_64-linux-gnu.so
1799455:
1799455: find library=libsqlite3.so.0 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libsqlite3.so.0
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libsqlite3.so.0
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libsqlite3.so.0
1799455: trying file=glibc-hwcaps/x86-64-v2/libsqlite3.so.0
1799455: trying file=tls/x86_64/x86_64/libsqlite3.so.0
1799455: trying file=tls/x86_64/libsqlite3.so.0
1799455: trying file=tls/x86_64/libsqlite3.so.0
1799455: trying file=tls/libsqlite3.so.0
1799455: trying file=x86_64/x86_64/libsqlite3.so.0
1799455: trying file=x86_64/libsqlite3.so.0
1799455: trying file=x86_64/libsqlite3.so.0
1799455: trying file=libsqlite3.so.0
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libsqlite3.so.0
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libsqlite3.so.0
1799455:
1799455:
1799455: calling init: /usr/lib/python3.10/lib-dynload/_sqlite3.cpython-310-x86_64-linux-gnu.so
1799455:
1799455: find library=libapt-pkg.so.6.0 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libapt-pkg.so.6.0
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libapt-pkg.so.6.0
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libapt-pkg.so.6.0
1799455: trying file=glibc-hwcaps/x86-64-v2/libapt-pkg.so.6.0
1799455: trying file=tls/x86_64/x86_64/libapt-pkg.so.6.0
1799455: trying file=tls/x86_64/libapt-pkg.so.6.0
1799455: trying file=tls/x86_64/libapt-pkg.so.6.0
1799455: trying file=tls/libapt-pkg.so.6.0
1799455: trying file=x86_64/x86_64/libapt-pkg.so.6.0
1799455: trying file=x86_64/libapt-pkg.so.6.0
1799455: trying file=x86_64/libapt-pkg.so.6.0
1799455: trying file=libapt-pkg.so.6.0
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libapt-pkg.so.6.0
1799455:
1799455: find library=libstdc++.so.6 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libstdc++.so.6
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libstdc++.so.6
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libstdc++.so.6
1799455: trying file=glibc-hwcaps/x86-64-v2/libstdc++.so.6
1799455: trying file=tls/x86_64/x86_64/libstdc++.so.6
1799455: trying file=tls/x86_64/libstdc++.so.6
1799455: trying file=tls/x86_64/libstdc++.so.6
1799455: trying file=tls/libstdc++.so.6
1799455: trying file=x86_64/x86_64/libstdc++.so.6
1799455: trying file=x86_64/libstdc++.so.6
1799455: trying file=x86_64/libstdc++.so.6
1799455: trying file=libstdc++.so.6
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libstdc++.so.6
1799455:
1799455: find library=libgcc_s.so.1 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libgcc_s.so.1
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libgcc_s.so.1
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libgcc_s.so.1
1799455: trying file=glibc-hwcaps/x86-64-v2/libgcc_s.so.1
1799455: trying file=tls/x86_64/x86_64/libgcc_s.so.1
1799455: trying file=tls/x86_64/libgcc_s.so.1
1799455: trying file=tls/x86_64/libgcc_s.so.1
1799455: trying file=tls/libgcc_s.so.1
1799455: trying file=x86_64/x86_64/libgcc_s.so.1
1799455: trying file=x86_64/libgcc_s.so.1
1799455: trying file=x86_64/libgcc_s.so.1
1799455: trying file=libgcc_s.so.1
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libgcc_s.so.1
1799455:
1799455: find library=libbz2.so.1.0 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libbz2.so.1.0
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libbz2.so.1.0
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libbz2.so.1.0
1799455: trying file=glibc-hwcaps/x86-64-v2/libbz2.so.1.0
1799455: trying file=tls/x86_64/x86_64/libbz2.so.1.0
1799455: trying file=tls/x86_64/libbz2.so.1.0
1799455: trying file=tls/x86_64/libbz2.so.1.0
1799455: trying file=tls/libbz2.so.1.0
1799455: trying file=x86_64/x86_64/libbz2.so.1.0
1799455: trying file=x86_64/libbz2.so.1.0
1799455: trying file=x86_64/libbz2.so.1.0
1799455: trying file=libbz2.so.1.0
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libbz2.so.1.0
1799455:
1799455: find library=liblzma.so.5 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/liblzma.so.5
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/liblzma.so.5
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/liblzma.so.5
1799455: trying file=glibc-hwcaps/x86-64-v2/liblzma.so.5
1799455: trying file=tls/x86_64/x86_64/liblzma.so.5
1799455: trying file=tls/x86_64/liblzma.so.5
1799455: trying file=tls/x86_64/liblzma.so.5
1799455: trying file=tls/liblzma.so.5
1799455: trying file=x86_64/x86_64/liblzma.so.5
1799455: trying file=x86_64/liblzma.so.5
1799455: trying file=x86_64/liblzma.so.5
1799455: trying file=liblzma.so.5
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/liblzma.so.5
1799455:
1799455: find library=liblz4.so.1 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/liblz4.so.1
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/liblz4.so.1
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/liblz4.so.1
1799455: trying file=glibc-hwcaps/x86-64-v2/liblz4.so.1
1799455: trying file=tls/x86_64/x86_64/liblz4.so.1
1799455: trying file=tls/x86_64/liblz4.so.1
1799455: trying file=tls/x86_64/liblz4.so.1
1799455: trying file=tls/liblz4.so.1
1799455: trying file=x86_64/x86_64/liblz4.so.1
1799455: trying file=x86_64/liblz4.so.1
1799455: trying file=x86_64/liblz4.so.1
1799455: trying file=liblz4.so.1
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/liblz4.so.1
1799455:
1799455: find library=libzstd.so.1 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libzstd.so.1
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libzstd.so.1
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libzstd.so.1
1799455: trying file=glibc-hwcaps/x86-64-v2/libzstd.so.1
1799455: trying file=tls/x86_64/x86_64/libzstd.so.1
1799455: trying file=tls/x86_64/libzstd.so.1
1799455: trying file=tls/x86_64/libzstd.so.1
1799455: trying file=tls/libzstd.so.1
1799455: trying file=x86_64/x86_64/libzstd.so.1
1799455: trying file=x86_64/libzstd.so.1
1799455: trying file=x86_64/libzstd.so.1
1799455: trying file=libzstd.so.1
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libzstd.so.1
1799455:
1799455: find library=libudev.so.1 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libudev.so.1
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libudev.so.1
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libudev.so.1
1799455: trying file=glibc-hwcaps/x86-64-v2/libudev.so.1
1799455: trying file=tls/x86_64/x86_64/libudev.so.1
1799455: trying file=tls/x86_64/libudev.so.1
1799455: trying file=tls/x86_64/libudev.so.1
1799455: trying file=tls/libudev.so.1
1799455: trying file=x86_64/x86_64/libudev.so.1
1799455: trying file=x86_64/libudev.so.1
1799455: trying file=x86_64/libudev.so.1
1799455: trying file=libudev.so.1
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libudev.so.1
1799455:
1799455: find library=libsystemd.so.0 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libsystemd.so.0
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libsystemd.so.0
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libsystemd.so.0
1799455: trying file=glibc-hwcaps/x86-64-v2/libsystemd.so.0
1799455: trying file=tls/x86_64/x86_64/libsystemd.so.0
1799455: trying file=tls/x86_64/libsystemd.so.0
1799455: trying file=tls/x86_64/libsystemd.so.0
1799455: trying file=tls/libsystemd.so.0
1799455: trying file=x86_64/x86_64/libsystemd.so.0
1799455: trying file=x86_64/libsystemd.so.0
1799455: trying file=x86_64/libsystemd.so.0
1799455: trying file=libsystemd.so.0
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libsystemd.so.0
1799455:
1799455: find library=libgcrypt.so.20 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libgcrypt.so.20
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libgcrypt.so.20
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libgcrypt.so.20
1799455: trying file=glibc-hwcaps/x86-64-v2/libgcrypt.so.20
1799455: trying file=tls/x86_64/x86_64/libgcrypt.so.20
1799455: trying file=tls/x86_64/libgcrypt.so.20
1799455: trying file=tls/x86_64/libgcrypt.so.20
1799455: trying file=tls/libgcrypt.so.20
1799455: trying file=x86_64/x86_64/libgcrypt.so.20
1799455: trying file=x86_64/libgcrypt.so.20
1799455: trying file=x86_64/libgcrypt.so.20
1799455: trying file=libgcrypt.so.20
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libgcrypt.so.20
1799455:
1799455: find library=libxxhash.so.0 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libxxhash.so.0
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libxxhash.so.0
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libxxhash.so.0
1799455: trying file=glibc-hwcaps/x86-64-v2/libxxhash.so.0
1799455: trying file=tls/x86_64/x86_64/libxxhash.so.0
1799455: trying file=tls/x86_64/libxxhash.so.0
1799455: trying file=tls/x86_64/libxxhash.so.0
1799455: trying file=tls/libxxhash.so.0
1799455: trying file=x86_64/x86_64/libxxhash.so.0
1799455: trying file=x86_64/libxxhash.so.0
1799455: trying file=x86_64/libxxhash.so.0
1799455: trying file=libxxhash.so.0
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libxxhash.so.0
1799455:
1799455: find library=libcap.so.2 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libcap.so.2
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libcap.so.2
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libcap.so.2
1799455: trying file=glibc-hwcaps/x86-64-v2/libcap.so.2
1799455: trying file=tls/x86_64/x86_64/libcap.so.2
1799455: trying file=tls/x86_64/libcap.so.2
1799455: trying file=tls/x86_64/libcap.so.2
1799455: trying file=tls/libcap.so.2
1799455: trying file=x86_64/x86_64/libcap.so.2
1799455: trying file=x86_64/libcap.so.2
1799455: trying file=x86_64/libcap.so.2
1799455: trying file=libcap.so.2
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libcap.so.2
1799455:
1799455: find library=libgpg-error.so.0 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libgpg-error.so.0
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libgpg-error.so.0
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libgpg-error.so.0
1799455: trying file=glibc-hwcaps/x86-64-v2/libgpg-error.so.0
1799455: trying file=tls/x86_64/x86_64/libgpg-error.so.0
1799455: trying file=tls/x86_64/libgpg-error.so.0
1799455: trying file=tls/x86_64/libgpg-error.so.0
1799455: trying file=tls/libgpg-error.so.0
1799455: trying file=x86_64/x86_64/libgpg-error.so.0
1799455: trying file=x86_64/libgpg-error.so.0
1799455: trying file=x86_64/libgpg-error.so.0
1799455: trying file=libgpg-error.so.0
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libgpg-error.so.0
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libgpg-error.so.0
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libcap.so.2
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libxxhash.so.0
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libgcrypt.so.20
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/liblzma.so.5
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libzstd.so.1
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/liblz4.so.1
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libsystemd.so.0
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libudev.so.1
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libbz2.so.1.0
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libgcc_s.so.1
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libstdc++.so.6
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libapt-pkg.so.6.0
1799455:
1799455:
1799455: calling init: /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so
1799455:
1799455:
1799455: calling init: /usr/lib/python3.10/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so
1799455:
1799455:
1799455: calling init: /usr/lib/python3.10/lib-dynload/_lzma.cpython-310-x86_64-linux-gnu.so
1799455:
1799455: find library=libnss_systemd.so.2 [0]; searching
1799455: search path=/usr/lib64 (LD_LIBRARY_PATH)
1799455: trying file=/usr/lib64/libnss_systemd.so.2
1799455: search path=/usr/lib (system search path)
1799455: trying file=/usr/lib/libnss_systemd.so.2
1799455: search path=glibc-hwcaps/x86-64-v3:glibc-hwcaps/x86-64-v2:tls/x86_64/x86_64:tls/x86_64:tls/x86_64:tls:x86_64/x86_64:x86_64:x86_64: (LD_LIBRARY_PATH)
1799455: trying file=glibc-hwcaps/x86-64-v3/libnss_systemd.so.2
1799455: trying file=glibc-hwcaps/x86-64-v2/libnss_systemd.so.2
1799455: trying file=tls/x86_64/x86_64/libnss_systemd.so.2
1799455: trying file=tls/x86_64/libnss_systemd.so.2
1799455: trying file=tls/x86_64/libnss_systemd.so.2
1799455: trying file=tls/libnss_systemd.so.2
1799455: trying file=x86_64/x86_64/libnss_systemd.so.2
1799455: trying file=x86_64/libnss_systemd.so.2
1799455: trying file=x86_64/libnss_systemd.so.2
1799455: trying file=libnss_systemd.so.2
1799455: search cache=/etc/ld.so.cache
1799455: trying file=/lib/x86_64-linux-gnu/libnss_systemd.so.2
1799455:
1799455:
1799455: calling init: /lib/x86_64-linux-gnu/libnss_systemd.so.2
1799455:
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endaliasent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endetherent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endhostent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endnetent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endnetgrent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endprotoent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endrpcent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_endservent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getaliasbyname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getaliasent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getcanonname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getetherent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostbyaddr2_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostbyaddr_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostbyname2_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostbyname3_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostbyname4_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostbyname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_gethostton_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getnetbyaddr_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getnetbyname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getnetent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getnetgrent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getntohost_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getprotobyname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getprotobynumber_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getprotoent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getpublickey (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getrpcbyname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getrpcbynumber_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getrpcent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getsecretkey (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getservbyname_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getservbyport_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_getservent_r (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_netname2user (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setaliasent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setetherent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_sethostent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setnetent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setnetgrent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setprotoent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setrpcent (fatal)
1799455: /lib/x86_64-linux-gnu/libnss_systemd.so.2: error: symbol lookup error: undefined symbol: _nss_systemd_setservent (fatal)
Command ‘dotnet’ not found, but can be installed with:
apt install dotnet-host # version 6.0.132-0ubuntu1~22.04.1, or
apt install dotnet-host-8.0 # version 8.0.8-0ubuntu1~22.04.1
apt install dotnet-host-7.0 # version 7.0.119-0ubuntu1~22.04.1
1799455:
1799455: calling fini: /usr/bin/python3 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libexpat.so.1 [0]
1799455:
1799455:
1799455: calling fini: /usr/lib/python3.10/lib-dynload/_json.cpython-310-x86_64-linux-gnu.so [0]
1799455:
1799455:
1799455: calling fini: /usr/lib/python3.10/lib-dynload/_sqlite3.cpython-310-x86_64-linux-gnu.so [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libsqlite3.so.0 [0]
1799455:
1799455:
1799455: calling fini: /usr/lib/python3/dist-packages/apt_pkg.cpython-310-x86_64-linux-gnu.so [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libapt-pkg.so.6.0 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libz.so.1 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libstdc++.so.6 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libm.so.6 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libgcc_s.so.1 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libudev.so.1 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libsystemd.so.0 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/liblz4.so.1 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libzstd.so.1 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libgcrypt.so.20 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libxxhash.so.0 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libcap.so.2 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libgpg-error.so.0 [0]
1799455:
1799455:
1799455: calling fini: /usr/lib/python3.10/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libbz2.so.1.0 [0]
1799455:
1799455:
1799455: calling fini: /usr/lib/python3.10/lib-dynload/_lzma.cpython-310-x86_64-linux-gnu.so [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/liblzma.so.5 [0]
1799455:
1799455:
1799455: calling fini: /lib/x86_64-linux-gnu/libnss_systemd.so.2 [0]

There is a very simple approach to troubleshooting ODBC related issues, irrespective of the ODBC binding layer in use (be it unixODBC or iODBC).

  1. Install the SDK and Runtime components
  2. Verify the installation by creating a DSN and testing a DB connection using iSQL (each package offers its variant of the same thing.

You are either going to succeed or fail regarding the above. If you are successful, proceed to using .NET with its bindings to unixODBC.

Do you have a basic unixODBC connection to Virtuoso working?

/cc @hwilliams

Created a DSN with the below record
[JoshTest]
Driver = /usr/lib64/
Server = 127.0.0.1
port = 1433
Database = Ajo
Trusted_Connection = yes

and was unable to connect.
Error message: [IM002][unixODBC][Driver Manager]Data source name not found and no default driver specified.

Is there something I am doing wrong here in creating the DSN, please advice.

Why do you have Driver = /usr/lib64/ in the ODBC DSN point to a directory and not the actual Virtuoso ODBC Driver file name virtodbcu_r.so wherever it resides on your Linux machine ?

Why is port = 1433 which is the default SQL Server port number, as are the other parameters of your DSN specific to SQL Server (apart from Driver) and so will not work with Virtuoso.

See the Virtuoso ODBC Driver document which details the Virtuoso ODBC Driver params for Unix/Linux.

Please provide complete details of the steps being performed, in text form, so we can see clearly what you are doing …

Your Virtuoso Driver wouldn’t be installed to /usr/lib64/. The Virtuoso ODBC Driver Library is named virtodbcu_r.so and it would be situated in the directory /opt/virtuoso/lib by default, or the 'lib` sub-directory within your Virtuoso installation directory.

The default odbc.ini for a unixODBC installation would be /etc/odbc.ini which you can verify using:

  1. ls -ltha /etc/odbc.ini
  2. cat /etc/odbc.ini

/cc @hwilliams

Note this Virtuoso Linux ODBC Driver connection using unixODBC Driver Manager document we have just created, which should assist you.