error while loading shared libraries: libcapnp-0.5.3.so

淺唱寂寞╮ 提交于 2019-12-13 07:52:51

问题


I think this is a generic problem not specifically related to Cap'n Proto.

My project's build succeeds but on run I get:

error while loading shared libraries: libcapnp-0.5.3.so: cannot open shared object file: No such file or directory

Maybe I am missing something in CMake?

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lcapnp -lkj")

I verified libcapnp-0.5.3.so exists in /usr/local/lib

I also tried adding:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L/usr/local/lib/libcapnp-0.5.3.so")

回答1:


/usr/local/lib needs to be added to /etc/ld.so.conf

then run sudo ldconfig to load the changes.



来源:https://stackoverflow.com/questions/31978684/error-while-loading-shared-libraries-libcapnp-0-5-3-so

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!