linux系统中没有unistr.c头文件解决办法

本文介绍如何使用sudo apt-get命令安装libunistring-dev包,该包包含unistr.h头文件,是GNU libunistring库的一部分。

sudo apt-get install libunistring-dev
unistr.h is installed as part of GNU libunistring.

-- The C compiler identification is GNU 13.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") -- Checking for module 'json-c' -- Found json-c, version 0.17 -- Default XMap configuration file location is /etc/xmap -- Checking if blacklist4.conf exists there... -- Checking if whitelist6.conf exists there... -- Checking if xmap.conf exists there... -- Configuring done (0.3s) -- Generating done (0.0s) -- Build files have been written to: /home/ubuntu/xmap/build [ 12%] Built target xmaplib [ 13%] Generating xopt.h [ 13%] Built target git_versioning [ 14%] Building C object src/CMakeFiles/xmap.dir/fieldset.c.o [ 15%] Building C object src/CMakeFiles/xmap.dir/get_gateway.c.o [ 16%] Building C object src/CMakeFiles/xmap.dir/filter.c.o [ 17%] Building C object src/CMakeFiles/xmap.dir/iterator.c.o /home/ubuntu/xmap/src/fieldset.c:13:10: fatal error: unistr.h: No such file or directory 13 | #include <unistr.h> | ^~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/xmap.dir/build.make:130: src/CMakeFiles/xmap.dir/fieldset.c.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /home/ubuntu/xmap/src/get_gateway.c:20: /home/ubuntu/xmap/src/get_gateway-linux.h:25:10: fatal error: pcap/pcap.h: No such file or directory 25 | #include <pcap/pcap.h> | ^~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/xmap.dir/build.make:158: src/CMakeFiles/xmap.dir/get_gateway.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:224: src/CMakeFiles/xmap.dir/all] Error 2 make: *** [Makefile:156: all] Error 2
07-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值