在/ bin / bash中为GNU / Linux附加LD_LIBRARY_PATH

时间:2015-03-16 06:54:10

标签: linux bash shell makefile

我想从makefile将特定目录附加到LD_LIBRARY_PATH。这就是我所做的,但它不起作用:

LD_LIBRARY_PATH=$(shell pwd)/include/libraries/:"$LD_LIBRARY_PATH";
export LD_LIBRARY_PATH
./test_udp.out

我在GNU / Linux中使用bash shell。现在我收到以下错误

./test_udp.out: error while loading shared libraries: libuv.so.1: cannot open shared object file: No such file or directory

但是当我将其修改为

export LD_LIBRARY_PATH=/home/ec2-user/Device-Connectivity/Signaling/include/libraries/ ;  ./test_udp.out

有效。

1 个答案:

答案 0 :(得分:-1)

替换

  

" $ LD_LIBRARY_PATH "

  

$ LD_LIBRARY_PATH

它会起作用。