我正在运行go build
并遇到以下问题:
/tmp/___go_build_myproject_: error while loading shared libraries: libSomeLib_x64.so: cannot open shared object file: No such file or directory
我在另一个目录中编译了libSomeLib_x64.so
。
从this question我知道我应该使用ldconfig链接lib。
我尝试将{lib}路径添加到/etc/ld.so.conf
和export LD_LIBRARY_PATH
,但没有任何帮助。我该如何摆脱错误?
答案 0 :(得分:0)
答案在这里:https://codeyarns.com/2017/11/02/how-shared-library-locations-are-found-at-runtime/
我将*.so
个库添加到/lib/
目录中。