linux报这个错的解决办法 error while loading shared libraries: libnnz11.so

0 0 * * * $HOME/ggmonitor/gg_map_table.sh >$HOME/ggmonitor/gg_map_table.log 2>&1

在 linux 上执行自动调度程序执行shell脚本连接到 goldengate 时 报下面的错
./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory
./ggsci: error while loading shared libraries: libnnz11.so: cannot open shared object file: No such file or directory

当时先确认了一个问题,就当前系统$HOME 是不正确的(这个尚未解决),我自己定义了路径,然后手工执行脚本没问题了
但是一旦自动调度就出问题,报上面的错,把所以有路径都弄成绝对路径也是这样
后面找到类似的问题(https://stackoverflow.com/questions/18410679/loading-shared-libraries-with-ssh-framework)

发现这个错主要是因为 .bashrc 这个没有 配置 LD_LIBRARY_PATH PATH ,这两个参数保持 .bash_profile 就可以了

.bashrc:该文件包含专用于某个用户的bash shell的bash信息,当该用户登录时以及每次打开新的shell时,该文件被读取
一般会在.bash_profile文件中显式调用.bashrc。登陆linux启动bash时首先会去读取/.bash_profile文件,这样/.bashrc也就得到执行了,你的个性化设置也就生效了。

修改配置文件.bashrc 下的参数 LD_LIBRARY_PATH PATH 问题就解决了

你可能感兴趣的:(linux报这个错的解决办法 error while loading shared libraries: libnnz11.so)