Unable to locate package libpcap 解决
程序员文章站
2022-07-14 15:33:51
...
安装指定版本
apt-get install libpcap-dev
测试程序
gcc -o test ./test.c -lpcap
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pcap/pcap.h>
int main(int argc,char *argv[]){
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev=pcap_lookupdev(errbuf);
if(dev==NULL){
fprintf(stderr,"couldn't find default device: %s\n",errbuf);
return(2);
}
printf("Device: %s\n",dev);
return(0);
}
上一篇: hive建表
下一篇: oracle创建表空间、创建用户授予权限
推荐阅读
-
Ubuntu install 错误 E:Unable to locate package
-
更改linux软件源产生的Unable to locate package错误解决办法
-
docker 容器内apt-get install 报E: Unable to locate package xxx问题解决
-
docker内安装vim、E: Unable to locate package vim、Could not connect to deb.debian.org:80
-
E: Unable to locate package
-
ubuntu安装lrzsz报错“E: Unable to locate package”
-
Unable to locate package
-
Unable to locate package
-
Unable to locate package
-
Unable to locate package