我试图编译一个名为ip响应器(https://github.com/cmouse/ip-sla-responder)的程序。我把所有东西复制到临时目录中。
root@srvmwips01:/tmp/ip-sla-responder-master# ls -l
total 128
-rw-r--r-- 1 ipsla ipsla 1072 Nov 9 2018 LICENSE
-rw-r--r-- 1 ipsla ipsla 641 Nov 9 2018 Makefile
-rw-r--r-- 1 ipsla ipsla 3143 Nov 9 2018 README.md
-rw-r--r-- 1 ipsla ipsla 2421 Nov 9 2018 arp.c
-rw-r--r-- 1 ipsla ipsla 8312 Nov 9 2018 cisco.c
-rw-r--r-- 1 ipsla ipsla 1946 Nov 9 2018 ether.c
-rw-r--r-- 1 ipsla ipsla 3229 Nov 9 2018 icmp4.c
-rw-r--r-- 1 ipsla ipsla 2320 Nov 9 2018 icmp6.c
-rw-r--r-- 1 ipsla ipsla 2413 Nov 9 2018 ip.c
-rw-r--r-- 1 ipsla ipsla 2368 Nov 9 2018 ip6.c
-rw-r--r-- 1 ipsla ipsla 3506 Nov 9 2018 junos.c
-rw-r--r-- 1 ipsla ipsla 9323 Nov 9 2018 main.c
-rw-r--r-- 1 ipsla ipsla 2587 Nov 9 2018 pak.c
-rw-r--r-- 1 ipsla ipsla 487 Nov 9 2018 responder.conf.sample
-rw-r--r-- 1 ipsla ipsla 4743 Nov 9 2018 responder.h
-rw-r--r-- 1 ipsla ipsla 33922 Nov 9 2018 test-main.c
-rw-r--r-- 1 ipsla ipsla 1920 Nov 9 2018 udp4.c
-rw-r--r-- 1 ipsla ipsla 1849 Nov 9 2018 udp6.c
-rw-r--r-- 1 ipsla ipsla 3020 Nov 9 2018 utils.c但是,当我想编译它时,我会收到一条错误消息:
root@srvmwips01:/# cd /tmp/ip-sla-responder-master/
root@srvmwips01:/tmp/ip-sla-responder-master# make CC=gcc
gcc -W -Wall -Wno-unused -Wno-unused-parameter -ggdb -O3 -DCONFIGFILE="\"/etc/responder.conf\"" -c -o utils.o utils.c
/bin/sh: 1: gcc: not found
make: *** [Makefile:27: utils.o] Error 127我安装了一个新的ubuntu 20.04,但它似乎不起作用。为了编译,我安装了以下工具:
root@srvmwips01:/# apt install make
root@srvmwips01:/# apt install libpcap-dev我已经试过chown和chmod来确保没有许可问题。手册说,为了使编译工作,我需要更多的东西:
它需要内核和AF_PACKET上的pcap3接口。它还需要图书馆员和libpcap。
但是这些软件包无法从apt安装(?)获得。我怎么弄到它们?我可以找到一个开发版本的libpcap。但不确定这是否相同。我读到,有一个预准备检查命令,它从apt存储加载所有必要的模块,但这只适用于托管在上面的应用程序。我通过github下载了我的应用程序。我搜索了https://packages.ubuntu.com/站点以找到库,但有些搜索没有结果,而其他搜索则返回了大量条目。
发布于 2020-06-30 15:35:39
您缺少GCC编译器和g++/gcc编译所需的其他库。
这一点可以从您的错误消息中得到证明,该消息非常清楚:
/bin/sh: 1: gcc: not found用build-essential安装sudo apt install build-essential。这将引入g++、gcc和编译软件所需的核心基本构建库。
https://askubuntu.com/questions/1255089
复制相似问题