在Termux中编译Nodejs库sharp
有一个 Nodejs 项目使用到了图形处理库 sharp,但是想在 termux 中使用必须自行编译。关于 sharp 的介绍在这里不再阐述,想了解的可以去看项目主页和文档。下面给出编译方法。
- sharp 项目地址:https://github.com/lovell/sharp
- sharp 文档地址:https://sharp.pixelplumbing.com/
编译步骤
1.下载项目到 Temux
如果手机上还没有 termux,请先安装 termux 和 nodejs 环境:termux的使用方法总结
1 | |
2.安装编译环境
1 | |
3.执行编译
1 | |
编译成功后会在项目目录下生成 build/Realease/sharp-android-arm64v8.node 文件
在Termux中编译Nodejs库sharp
https://blog.itfox.net/posts/在termux中编译nodejs库sharp.html