Clsql connect oracle database

I am doing some practice with clsql. I want to connect oracle server, hence my connection function:

(connect '("192.168.2.3" "xe" "username" "password") :database-type :oracle)

When I click on return, the following error message appears.

Couldn't load foreign libraries "libclntsh", "oci". (searched *FOREIGN-LIBRARY-SEARCH-PATHS*) [Condition of type SIMPLE-ERROR]

I have already installed oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm

and define export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib

So what else do I need to do to connect the server?

+3
source share
2 answers

One thing that excites me with the dynamic link to Oracle libs (in C / C ++, which is) is that the generic libclntsh.so object comes with the version after , so the name is, so you may need to create a soft link in the same directory, ensuring that the name of the soft link is just libclntsh.so

0

, , , libclntsh /etc/ld.conf.d/oracle.conf

(redhat, centos - root): oracle

oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm
install via rpm -ivh oracle*.rpm

/etc/ld.so.conf.d/oracle.conf:

/usr/lib/oracle/12.1/client64/lib

ldconfig

, clsql-oracle quicklisp, clsql-6.6.2,

(require "asdf")
(push #P"/opt/jeff/clsql-6.6.2/" asdf:*central-registry*)
(asdf:load-system :clsql-oracle)
(defparameter *some-db* (connect '("127.0.0.1:1521/db1" "SOME_USER_RO" "*******") :database-type :oracle))

,

0

Source: https://habr.com/ru/post/1762007/


All Articles