11 lines
308 B
Markdown
11 lines
308 B
Markdown
如果二进制文件是动态链接的,可以用 [`staticx`](https://github.com/JonathonReinhart/staticx) 将其转为静态:
|
|
|
|
|
|
# 安装 staticx
|
|
pip install staticx patchelf
|
|
|
|
# 封装二进制文件
|
|
staticx ./my-app ./my-app-static
|
|
|
|
# 验证
|
|
ldd ./my-app-static # 应输出 "not a dynamic executable" |