(node:8175) UnhandledPromiseRejectionWarning: Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/node-oracledb/INSTALL.html for help
Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html
You must have 64-bit Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH.
If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
at OracleDb.getConnection (/web/nodejs-knex-express/node_modules/oracledb/lib/oracledb.js:354:25)
at OracleDb.getConnection (/web/nodejs-knex-express/node_modules/oracledb/lib/util.js:192:10)
at /web/nodejs-knex-express/node_modules/knex/lib/dialects/oracledb/index.js:150:21
at new Promise (<anonymous>)
at Client_Oracledb.acquireRawConnection (/web/nodejs-knex-express/node_modules/knex/lib/dialects/oracledb/index.js:124:29)
at create (/web/nodejs-knex-express/node_modules/knex/lib/client.js:254:39)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:8175) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
(node:8175) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
일부러 낮은 버전으로 다운로드 받아서 테스트 진행
(사용하는 오라클 버전이 많이 낮아서 혹시 몰라서...)
오라클 클라이언트 설치
인터넷에서 찾았을때는 아래 파일 설치를 진행하라고 나왔는데;
우분투에서는 해당 패키지가 없다고 나옴.
apt-get install libaio
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libaio
apt search libaio
로 찾아보니 비슷한 패키지(libaio1
)를 확인
apt-get install libaio1
아래에 경로 위에서 설치한 오라클 클라이언트 압축파일을 설치
'/opt/oracle/`
vim ~/.bashrc
명령어를 사용해서 오라클에서 사용하는 환경 변수 저장
export TNS_ADMIN=
export LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2
https://askubuntu.com/questions/227791/how-do-i-install-libaio
echo env
unset 변수명