linux - Arch无法编译安装plustache因缺乏boost_regex

 meili_ml_333_655 发布于 2022-11-04 23:29

想要安装plustache
但是因为报错/usr/bin/ld: cannot find -lboost_regex-mt无法成功make
已经pacman -S boost

make  all-am
make[1]: Entering directory '/home/*****/Download/plustache'
/bin/sh ./libtool  --tag=CXX   --mode=link g++  -g -O2  -lboost_regex-mt -o libplustache.la -rpath /usr/local/lib src/template.lo src/context.lo  
libtool: link: g++  -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib/crti.o /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/crtbeginS.o  src/.libs/template.o src/.libs/context.o   -lboost_regex-mt -L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/crtendS.o /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib/crtn.o  -g -O2   -Wl,-soname -Wl,libplustache.so.0 -o .libs/libplustache.so.0.0.0
/usr/bin/ld: cannot find -lboost_regex-mt
collect2: error: ld returned 1 exit status
Makefile:468: recipe for target 'libplustache.la' failed
make[1]: *** [libplustache.la] Error 1
make[1]: Leaving directory '/home/*****/Download/plustache'
Makefile:371: recipe for target 'all' failed
make: *** [all] Error 2

但是/usr/lib/libboost_regex.so确实存在啊~~~~

2 个回答
  • AUR 里有 plustache, 直接 yaourt -S plustache 就好了。
    报错的有原因是因为需要链接的是 boost_regex 不是 boost_regex-mt,看PKGBUILD。

    2022-11-09 03:39 回答
  • -lboost_regex-mt

    2022-11-09 03:42 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有