当我尝试安装 /aicrack-ng/mdk4 时,我得到:
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
- 然后我在github上找到了这个解决方案:
安装
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
答案1
您make
直接运行,而不是通过 AUR helper/ 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
更详细地解释了语法和传递变量。
您可能还需要安装铿锵声如果您还没有;它看起来不像是 Archbase-devel
团队的一部分,我不确定 Manjaro 的情况。