Linux capabilities (setcap) seems to disable LD_LIBRARY_PATH

前端 未结 5 1878
梦谈多话
梦谈多话 2020-12-04 23:48

I use LD_LIBRARY_PATH to set the path of a certain user library for an application. But if I set capabilities on this application

sudo setcap CA         


        
5条回答
  •  既然无缘
    2020-12-05 00:33

    As already stated in other answers, this behavior is intended. There is some kind of workaround if you can compile (or at least link) the application yourself. Then you can pass -Wl,-rpath to gcc or -rpath to ld and you won't have to specify LD_LIBRARY_PATH at all on execution.

提交回复
热议问题