Files
FastDeploy/docs/cn/faq/build_fastdeploy_package.md
Wang Xinyu 3e5c219ab3 [Other] Generate Debian package and RPM package (#1043)
* cpack deb

* cpack prerm script

* optim postinst script

* generate rpm package

* add build fd package doc

* update build fd package doc
2023-01-10 10:26:58 +08:00

40 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

中文 | [English](../../en/faq/build_fastdeploy_package.md)
# 编译FastDeploy C++安装包
FastDeploy提供了Debian安装包和RPM安装包的打包工具用于生成FastDeploy C++ SDK的安装包。相比于Tar压缩包安装包具有以下优势
- 安装时自动运行脚本来配置lib路径不需要用户手动设置LD_LIBRARY_PATH等环境变量
- 自动管理依赖库关系和版本,自动安装依赖项
## Debian安装包
Debian安装包适用于Debian系列的Linux发行版例如Ubuntu
```
# 设置编译选项运行cmake和make
cmake .. -DENABLE_PADDLE_BACKEND=ON -DENABLE_VISION=ON -DCMAKE_INSTALL_PREFIX=/opt/paddlepaddle/fastdeploy
make -j
# 运行cpack生成.deb安装包
cpack -G DEB
# 安装.deb
dpkg -i xxx.deb
```
## RPM安装包
RPM安装包适用于RedHat系列的Linux发行版例如CentOS
```
# 设置编译选项运行cmake和make
cmake .. -DENABLE_PADDLE_BACKEND=ON -DENABLE_VISION=ON -DCMAKE_INSTALL_PREFIX=/opt/paddlepaddle/fastdeploy
make -j
# 运行cpack生成.rpm安装包
cpack -G RPM
# 安装.rpm
rpm -i xxx.rpm
```