Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libclntsh.so.18.1: cannot open shared object file #34

Closed
duhongx opened this issue Feb 27, 2019 · 4 comments
Closed

libclntsh.so.18.1: cannot open shared object file #34

duhongx opened this issue Feb 27, 2019 · 4 comments

Comments

@duhongx
Copy link

duhongx commented Feb 27, 2019

[root@ecs003 oracle_exporter]# ./oracledb_exporter -h
./oracledb_exporter: error while loading shared libraries: libclntsh.so.18.1: cannot open shared object file: No such file or directory
[root@ecs003 oracle_exporter]# find / -iname "libclntsh*.*" -type f
/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1

oracle_exporter version:oracledb_exporter.0.2.1
oracle client version:11.2.0.4.0

why oracledb_exporter depend on libclntsh.so.18.1?

@duhongx duhongx closed this as completed Feb 27, 2019
@gabrielbahniuk
Copy link

Did you solve your issue?

I solved it by setting this: export LD_LIBRARY_PATH=/usr/lib/oracle/18.3/client64/lib

PS: Pay attention not to put a / at the end, e.g. correct is .../lib and NOT .../lib/

@wbh1
Copy link

wbh1 commented Mar 6, 2019

@duhongx I've run into a similar issue but I am on 12.2. How did you end up solving your issue?

My LD_LIBRARY_PATH and ORACLE_HOME seem to be fine. I have other programs on the server in question using the same client without issue.

ORACLE_HOME=/usr/lib/oracle/12.2/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib

Edit: I ended up installing the 0.2.0 release and that one works fine. It's 0.2.1 and above that don't work with the 12.2 client.

@gabrielbahniuk
Copy link

@duhongx I've run into a similar issue but I am on 12.2. How did you end up solving your issue?

My LD_LIBRARY_PATH and ORACLE_HOME seem to be fine. I have other programs on the server in question using the same client without issue.

ORACLE_HOME=/usr/lib/oracle/12.2/client64
LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib

Edit: I ended up installing the 0.2.0 release and that one works fine. It's 0.2.1 and above that don't work with the 12.2 client.

Hi @wbh1 ,

I know you did not ask me, but I wanted to reply anyway, just in case it helps someone in the future.

It was really weird, but sometimes when my path is like yours LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib and I got the same error, I just ran export LD_LIBRARY_PATH= and then export LD_LIBRARY_PATH=/usr/lib/oracle/12.2/client64/lib again, and then it worked. Even if it was already fine, I had to do this workaround to make it work.

@Yannig
Copy link
Collaborator

Yannig commented Mar 10, 2019

And what about to run the exporter in a Docker container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants