FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

error while loading shared libraries: libonnxruntime.so.1.12.0: cannot open shared object file: No such file or directory

Open catofyuanyuan opened this issue 2 years ago • 2 comments


温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度


环境

  • 【FastDeploy版本】: FastDeploy1.0.7
  • 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
  • 【系统平台】: 在两个平台上测试均有该问题,平台1:AGX Ubuntu 20.04; 平台2:RG3588(LINUX)
  • 【硬件】: 平台1: CUDA 11.4 CUDNN 8.6 TRT5.1.1
  • 【编译语言】: C++

运行报错内容

    • 先执行examples下的部署示例,出现报错“error while loading shared libraries: libonnxruntime.so.1.12.0: cannot open shared object file: No such file or directory”

尝试以下三种解决方式

  • -1. export LD_LIBRARY_PATH= /path/to/libonnxruntime.so.1.12.0,同一窗口下然后执行二进制
  • -2.直接将文件粘贴至build文件夹下,然后执行二进制
  • -3.执行 source /path/to/fastdeploy-linux-xxx/fastdeploy_init.sh,然后执行二进制
  • -以上三种方式均没有解决此类问题,可能不是路径的问题,但是想不到还有什么点没有考虑到

catofyuanyuan avatar Nov 09 '23 08:11 catofyuanyuan

已解决 执行 source /path/to/fastdeploy-linux-xxx/fastdeploy_init.sh,并在同一窗口下执行二进制

catofyuanyuan avatar Nov 09 '23 10:11 catofyuanyuan

libonnxruntime.so.1.12.0是pip install onnxruntime就会有的文件吗

wwfcnu avatar Jan 08 '25 03:01 wwfcnu