IBM Informix driver for NodeJS - Setting environment variables on MacOS

烂漫一生 提交于 2019-12-11 04:27:14

问题


This is a follow on to my original question

I am trying to set up IBM's Informix driver for use with NodeJS on MacOS.

After viewing the Readme file for the Informix NPM library, I am a little confused as to what the environment variables are and whether I need to apply them all?

I managed to track down the install location for the SDK files: Applications/IBM/informix and then added this to the ~/.bash_profile file as so:

export INFORMIXDIR=/Applications/IBM/informix
export PATH=$PATH:$INFORMIDIR

Should I change my PATH to include /bin at the end?

I am also confused by the remainder of the statements in the Readme. I was expecting to set the server name and host dynamically rather than hard-coding them?

Some guidance would be appreciated.


回答1:


The PATH env variable needs $INFORMIXDIR/bin. (There is nothing in plain $INFORMIXDIR worth running other than the install script).

INFORMIXSERVER and INFORMIXSQLHOSTS may be needed for testing the module, but they are not hardcoded (the module will not store that anywhere) You will always be able to specify a different INFORMIXSERVER/INFORMIXSQLHOSTS at runtime.

I never tried it on a MacOS, but you may also need to add DYLD_LIBRARY_PATH, something like "export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH" to your script. Some MacOS binaries will use DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH.



来源:https://stackoverflow.com/questions/56273516/ibm-informix-driver-for-nodejs-setting-environment-variables-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!