当我试图安装/aicrack/mdk4 4时,我得到:
error: ld returned 1 exit status make[1]: *** [Makefile:38: mdk4] Error 1 make[1]: Leaving directory '/home/u4/mdk4/src' make: *** [Makefile:10: all] Error 2
这是输出的结束(因为当我提交整个输出时,它被视为垃圾邮件),当我在mdk4文件夹中运行“make”时。
make[2]: Leaving directory '/home/u4/mdk4/src/attacks'
make -C attacks
make[2]: Entering directory '/home/u4/mdk4/src/attacks'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/u4/mdk4/src/attacks'
gcc -g -W -Wall -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=mdk4-v1 -DCONFIG_LIBNL30 -DCONFIG_LIBNL -I/usr/include/libnl3 -g -O3 -Wall -Wextra -fcommon mdk4.c osdep/libosdep.a debug.o helpers.o mac_addr.o linkedlist.o greylist.o dumpfile.o packet.o brute.o osdep.o channelhopper.o ghosting.o fragmenting.o attacks/attacks.o attacks/auth_dos.o attacks/beacon_flood.o attacks/countermeasures.o attacks/deauth.o attacks/dummy.o attacks/eapol.o attacks/fuzzer.o attacks/ieee80211s.o attacks/probing.o attacks/wids.o -o mdk4 -lnl-genl-3 -lnl-3 -lm -Losdep -losdep -lpthread -lpcap
/usr/bin/ld: attacks/auth_dos.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/home/u4/mdk4/src/attacks/beacon_flood.c:34: multiple definition of `bssid'; attacks/auth_dos.o:/home/u4/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/beacon_flood.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/countermeasures.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/deauth.o:/home/u4/mdk4/src/attacks/deauth.c:19: multiple definition of `bssid'; attacks/auth_dos.o:/home/u4/mdk4/src/attacks/auth_dos.c:50: first defined here
/usr/bin/ld: attacks/deauth.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/dummy.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/eapol.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/fuzzer.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/ieee80211s.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/probing.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
/usr/bin/ld: attacks/wids.o:/home/u4/mdk4/src/attacks/attacks.h:39: multiple definition of `attack_count'; attacks/attacks.o:/home/u4/mdk4/src/attacks/attacks.h:39: first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:38: mdk4] Error 1
make[1]: Leaving directory '/home/u4/mdk4/src'
make: *** [Makefile:10: all] Error 2安装
git clone https://github.com/aircrack-ng/mdk4
cd mdk4
make
sudo make install
# Using Arch Linux (and derived) append `CC=clang` after any `make` in commands.但问题是我不知道该怎么做
在命令中的任何
CC=clang后面追加make。
我在bspwm环境中使用manjaro。
我该怎么办?
编辑:所以我做了CC=clang的事情,这次错误略有不同:error: linker command failed with exit code 1 (use -v to see invocation) make[1]: *** [Makefile:38: mdk4] Error 1 make[1]: Leaving directory '/home/u4/mdk4/src' make: *** [Makefile:10: all] Error 2
编辑:第一个屏幕截图是输出的开始,第二个屏幕截图是输出的结束。


发布于 2020-11-24 05:50:36
您正在直接运行make,而不是通过AUR助手/makepkg运行,对吗?那么,它应该像运行一样简单:
$ make CC=clang
[loads of output here]
$ sudo make install CC=clang而不是
$ make
[loads of output here]
$ sudo make install虽然我怀疑make install步骤严格需要CC设置,但包含它不应该有任何伤害。
这个古老的答案更详细地解释了语法和将变量传递到make中。
您可能还需要安装clang,如果您还没有它;它看起来不像是Arch的base-devel组的一部分,我不确定Manjaro。
https://unix.stackexchange.com/questions/621252
复制相似问题