项目场景:
ububntu18.04
已经安装LLVM,cmake找不到依赖包
问题描述:
cmake找不到依赖包
/usr/bin/ld: 找不到 -lLLVM
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
解决方案:
第一步,使用locate找依赖包:
locate libLLVM.so
(如果没安装locate,先用下列语句安装,安装完再执行locate libLLVM.so)
sudo apt install mlocate
第二步,进入定位到的路径中
第三步,复制对应的lib包到usr/local/lib中
sudo cp libLLVM.so /usr/local/lib/