我正在尝试在我的 .bashrc 中设置 LD_LIBRARY_PATH,但是当我添加多个路径时它不会起作用:
export LD_LIBRARY_PATH=/path/to/lib1
工作正常,当我在新终端上键入 $LD_LIBRARY_PATH 时,我得到
$ $LD_LIBRARY_PATH
bash: /path/to/lib1: is a directory
但是当我尝试
export LD_LIBRARY_PATH=/path/to/lib1:/path/to/lib2
(I also tried export LD_LIBRARY_PATH=/path/to/lib2:$LD_LIBRARY_PATH)
我明白了
$ $LD_LIBRARY_PATH
bash: /path/to/lib1:/path/to/lib2: No such file or directory
任何想法为什么会发生这种情况?