How to set LD_LIBRARY_PATH/DYLD_LIBRARY_PATH on macos

后端 未结 2 970
感情败类
感情败类 2021-01-06 11:52

On macos catalina \'\'\'echo $VARIABLE\'\'\'

I see the value of the variable but java couldn\'t read the system variable.

In linux there is not a problem

2条回答
  •  天涯浪人
    2021-01-06 12:21

    I believe that any given env variable in a process is not necessarily copied to any processes spawned from it.

    So, here, your zsh process clearly has the LD_LIBRARY_PATH env variable, but your java process does not.

    If you set it like so:

    LD_LIBRARY_PATH=/Applications/blabla

    you'd get this behaviour. You're looking for:

    export LD_LIBRARY_PATH=/Applications/blabla

提交回复
热议问题