Closed data-henrik closed 3 years ago
Hi, @data-henrik not sure why the package is looking for odbc. Can you try installing using crates.io. Also make sure that LD_LIBRARY_PATH is set i.e. export LD_LIBRARY_PATH="/foo/bar/clidriver:/foo/bar/clidriver/include:/foo/bar/clidriver/bin:/foo/bar/clidriver/lib"
Let me know if above works.
cargo run --package ibm_db --example setup
That's the failing command.
Hi @data-henrik I reinstalled the package on RHEL 8 and it installed successfully. I copied the src, example, cargo.toml and build.rs files on the machine and made sure that LD_LIBRARY_PATH is set to point to the correct directory of CLIDriver i.e. db2 driver in the format mentioned in prev message. Then I ran the command "cargo run --package ibm_db --example setup" and it ran seamlessly without error.
Can you please troubleshoot a bit more and check if some other settings are not missing like gcc etc. Some other dependent package might have some dependency that is not getting satisfied possibly. ibm-db package has dependency only on db2 library. Make sure you have the CLI driver installed. If not simply run the setup.rs file to download the same for your environment.
@data-henrik ,
I wanted to let you know that I also have issues with the environment variables not being used as lookup directories for the linker. I'm not sure why.
I resolved my issue by using this command:
RUSTFLAGS='-L /db2-query/clidriver/lib' cargo build --release
replace with your correct driver's lib path.
Hope it helps! 👍
EDIT:
Also I just noticed in your specific case you were failing to find lodbc.
depending on your OS I would sudo apt-get install unixodbc unixodbc-dev
or on mac
brew install unixodbc
I have the Db2 driver installed, cloned this git repo and ran the commands to build the example connect or the package. Both return the error message
How can I address that error? I searched for libodbc.so / libodbc.a but could not find it. This is on RHEL 8.3