我试图编译google/woff2 23天,但得到错误"libbrotli需要“。我能够通过在brotli文件夹中运行CMakeLists.txt来编译brotli,并获得.so文件。我是初学者,所以我不知道把两者联系在一起。我希望在CMakeLists.txt文件夹中编译和添加brotli,或者至少以某种方式为woff2编译linux。
谢谢
发布于 2021-10-10 03:44:54
在编译google/woff2 2之前,您似乎需要在您的计算机上编译并安装 brotli。安装过程实际上是将.so和头文件复制到系统路径上的某个CMake能够找到的位置。
例如,可以使用此命令将库安装到"/home/myuser/installdir“
cmake --install . --prefix "/home/myuser/installdir"发布于 2021-10-10 14:37:30
使用可执行文件中包含的libbrotli构建woff2
woff2/README.md说:
git克隆--递归https://github.com/google/woff2.git && cd woff2 2/&使所有
例如,woff2可执行文件可以构建并在WOF2/目录中使用,也可以复制到任何位置。
cd new-Folder/
git clone --recursive
https://github.com/google/woff2.git
cd woff2/
make clean all ## brotli libs and woff2 are built ... together
## executable: {woff2_compress, woff2_decompress, woff2_info}
## compress example
./woff2_compress satluj.ttf
Processing satluj.ttf => satluj.woff2
Compressed 45526 to 21423.P.S.:许多"Linux“都将woff2 (和libbrotli)作为包提供,名称= woff2或woff2-tools。
https://stackoverflow.com/questions/69512007
复制相似问题