floyd871 / prometheus_oracle_exporter

Prometheus Oracle Database exporter
MIT License
109 stars 77 forks source link

prometheus_oracle_exporter: error while loading shared libraries: #53

Open sergiohl1324 opened 4 years ago

sergiohl1324 commented 4 years ago

I have a problem when I start the service:

prometheus_oracle_exporter: /usr/local/bin/prometheus_oracle_exporter: error while loading shared libraries: libclntsh.so.12.1: cannot open shared object file: No such file or directory

I have my env correct:

export ORACLE_BASE=/orasoft/oracle/product export ORACLE_HOME=$ORACLE_BASE/12.2.0.1/db export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:/usr/local/bin:$PATH

And the library exist but don´t work:

[root@aquilesoralxvd012 system]# find / -name libclntsh.so.12.1 /oracw/grid/product/12.2.0.1/grid/lib/libclntsh.so.12.1 /oracw/grid/product/12.2.0.1/grid/inventory/Scripts/ext/lib/libclntsh.so.12.1 /oracw/grid/product/12.2.0.1/grid/inventory/backup/2019-05-21_11-47-08AM/Scripts/ext/lib/libclntsh.so.12.1 /orasoft/oracle/agent13c/agent_13.2.0.0.0/instantclient/libclntsh.so.12.1 /orasoft/oracle/product/12.2.0.1/db/lib/libclntsh.so.12.1 /orasoft/oracle/product/12.2.0.1/db/inventory/backup/2019-05-21_12-22-54PM/Scripts/ext/lib/libclntsh.so.12.1 /orasoft/oracle/product/12.2.0.1/db/inventory/Scripts/ext/lib/libclntsh.so.12.1

Any idea for fix this ?

floyd871 commented 4 years ago

The current binary is build agains 12.1 Libraries.

You have two options to fix your problem

  1. Build the Exporter against 12.2 Libraries
  2. Install in parallel 12.1 libraries.
floodgd commented 2 years ago

Probably not relevant, but you can simlink libclntsh.so.12.1 to libclntsh.so. This solved my problem.