用于NodeJS的IBM Informix驱动程序-在MacOS上设置环境变量 [英] IBM Informix driver for NodeJS - Setting environment variables on MacOS

查看:137
本文介绍了用于NodeJS的IBM Informix驱动程序-在MacOS上设置环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的>原始问题的后续内容

我正在尝试设置IBM的Informix驱动程序,以便与MacOS上的NodeJS一起使用.

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

在查看 Informix NPM库的自述文件后,我有点困惑什么是环境变量以及我是否需要全部应用?

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?

我设法找到了SDK文件的安装位置:Applications/IBM/informix,然后将其添加到~/.bash_profile文件中,如下所示:

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

我应该将我的PATH更改为在末尾包含/bin吗?

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?

一些指导将不胜感激.

推荐答案

PATH env变量需要$ INFORMIXDIR/bin. (除了安装脚本外,在普通的$ INFORMIXDIR中没有值得运行的东西.)

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

测试模块可能需要INFORMIXSERVER和INFORMIXSQLHOSTS,但是它们不是硬编码的(模块不会将其存储在任何地方) 您将始终能够在运行时指定其他INFORMIXSERVER/INFORMIXSQLHOSTS.

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.

我从未在MacOS上尝试过,但是您可能还需要在脚本中添加DYLD_LIBRARY_PATH,例如"export DYLD_LIBRARY_PATH = $ LD_LIBRARY_PATH". 某些MacOS二进制文件将使用DYLD_LIBRARY_PATH而不是LD_LIBRARY_PATH.

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.

这篇关于用于NodeJS的IBM Informix驱动程序-在MacOS上设置环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆