configure: error: *** POSIX caps library not found
来源:互联网 发布:war3 for mac打不开 编辑:程序博客网 时间:2024/05/21 10:43
在交叉编译systemd的时候,遇到上面的报错。
步骤是这样的:
export CFLAGS="-I/home/charles/code/build_systemd/libcap2-2.24/libcap/include"
export LDFLAGS="-L/home/charles/code/build_systemd/libcap2-2.24/libcap"
./configure --host=arm-linux-gnueabi错误如下:
checking for linux/vm_sockets.h... yeschecking for library containing clock_gettime... none requiredchecking for library containing cap_init... noconfigure: error: *** POSIX caps library not found
可是,caps 库文件是存在的:
$ ls /home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.*/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.a/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.h/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.pc/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.pc.in/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so.2/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so.2.24
看一下 config.log,里面有这样的错误:
configure:16647: arm-linux-gnueabi-gcc -o conftest -I/home/charles/code/build_systemd/libcap2-2.24/libcap/include -L/home/charles/code/build_systemd/libcap2-2.24/libcap conftest.c -lcap >&5/toolchain/armv7-gcc-6.3/bin/../lib/gcc/arm-linux-gnueabi/6.3.0/../../../../arm-linux-gnueabi/bin/ld: warning: libattr.so.1, needed by /home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so, not found (try using -rpath or -rpath-link)/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so: undefined reference to `removexattr@ATTR_1.0'/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so: undefined reference to `fremovexattr@ATTR_1.0'/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so: undefined reference to `getxattr@ATTR_1.0'/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so: undefined reference to `setxattr@ATTR_1.0'/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so: undefined reference to `fsetxattr@ATTR_1.0'/home/charles/code/build_systemd/libcap2-2.24/libcap/libcap.so: undefined reference to `fgetxattr@ATTR_1.0'collect2: error: ld returned 1 exit statusconfigure:16647: $? = 1configure: failed program was:| /* confdefs.h */| #define PACKAGE_NAME "systemd"| #define PACKAGE_TARNAME "systemd"| #define PACKAGE_VERSION "233"| #define PACKAGE_STRING "systemd 233"| #define PACKAGE_BUGREPORT "https://github.com/systemd/systemd/issues"| #define PACKAGE_URL "https://www.freedesktop.org/wiki/Software/systemd"| #define STDC_HEADERS 1| #define HAVE_SYS_TYPES_H 1| #define HAVE_SYS_STAT_H 1| #define HAVE_STDLIB_H 1| #define HAVE_STRING_H 1| #define HAVE_MEMORY_H 1| #define HAVE_STRINGS_H 1| #define HAVE_INTTYPES_H 1| #define HAVE_STDINT_H 1| #define HAVE_UNISTD_H 1| #define __EXTENSIONS__ 1| #define _ALL_SOURCE 1| #define SIZEOF_DEV_T 8| #define SIZEOF_INO_T 8| #define SIZEOF_RLIM_T 8| #define GPERF_LEN_TYPE size_t| #define HAVE_SYS_CAPABILITY_H 1| #define HAVE_LINUX_BTRFS_H 1| #define HAVE_LINUX_MEMFD_H 1| #define HAVE_LINUX_VM_SOCKETS_H 1| /* end confdefs.h. */|| /* Override any GCC internal prototype to avoid an error.| Use char because int might match the return type of a GCC| builtin and then its argument prototype would still apply. */| #ifdef __cplusplus| extern "C"| #endif| char cap_init ();| int| main ()| {| return cap_init ();| ;| return 0;| }configure:16664: result: noconfigure:16671: error: *** POSIX caps library not found原来,错误的原因是没有加上 -lattr.
修改如下:
export LDFLAGS="-L/home/charles/code/build_systemd/libcap2-2.24/libcap -L/home/charles/code/build_systemd/attr-2.4.47/libattr/.libs -lattr"
重新执行 configure,通过了。
0 0
- configure: error: *** POSIX caps library not found
- configure: error: readline library not found
- configure: error: readline library not found
- zabbix configure: error: MySQL library not found
- configure:error:readline library not found
- 安装postgreSQL出现configure: error: zlib library not found解决方法
- 安装postgreSQL出现configure:error:readline library not found解决方法
- 安装postgreSQL出现configure: error: zlib library not found解决方法
- 安装postgreSQL出现configure: error: zlib library not found解决方法
- Linux 源码安装 PostgreSql “ configure: error: readline library not found”
- 异常configure: *** apu library not found.
- configure: error: No curses/termcap library found
- configure: error: No curses/termcap library found
- configure: error: no termcap library found
- configure: error: no termcap library found
- 安装postgreSQL出现configure:error:readline library not found解决方法及pg安装全过程
- configure: error:" wrong mysql library version or lib not found. Check config.log for more informati
- 安装postgreSQL出现configure:error:readline library not found解决方法及pg安装全过程
- C#获取web.config配置文件内容
- IT职场经纬 |阿里web前端面试考题,你能答出来几个?
- 【Java多线程】synchronized与线程安全
- 求职加薪-Java8新特性必知必会-视频教程
- 递归分治
- configure: error: *** POSIX caps library not found
- mxnet 编译后运行的第一个demo train_mnist.py时的错误
- android开发_1_001
- 搬圆桌
- structs2-运用Action
- 解决Kubuntu 17.04和Ubuntu17.04无法安装网易云音乐 netease-cloud-music : 依赖: libqt5libqgtk2 但无法安装它
- mina3源码分析,启动过程分析(一)
- win10,win8 管理员账户没有权限,无法访问文件夹
- JBoss页面部署消息队列及相关例子