add use linux sdk

This commit is contained in:
Jason
2022-11-29 10:40:06 +08:00
parent 80a23e6072
commit ef28af7807
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
# Linux上C++部署
1. 编译完成运行,提示找不到.so文件
在执行二进制文件时需要能够在环境变量中找到FastDeploy相关的库文件。FastDeploy提供了辅助脚本来帮助完成。
执行如下命令即可将库路径导入到LD_LIBRARY_PATH中
```
source /Downloads/fastdeploy-linux-x64-1.0.0/fastdeploy_init.sh
```
再重新执行即可。 注意此命令执行后仅在当前的命令环境中生效(切换一个新的终端窗口,或关闭窗口重新打开后会无效),如若需要在系统中持续生效,可将这些环境变量加入到`~/.bashrc`文件中。

View File

@@ -0,0 +1,16 @@
# C++ Deployment on Linux
1. After compilation, and execute the binary file, throw error `error while loading shared libraries`
When we execute the binary file, it requires the dependent libraries can be found in the system, otherwise, it throws error like below
```
./infer_ppyoloe_demo: error while loading shared libraries: libonnxruntime.so.1.12.0: cannot open shared object file: No such file or directory
```
FastDeploy provides a shell scripts to help export the libraries path to `LD_LIBRARY_PATH`, execute the follwing command
```
source /Downloads/fastdeploy-linux-x64-1.0.0/fastdeploy_init.sh
```
And now you can execute the binary file again.