私はKali Linux学習侵入テストの新しいユーザーです。私はVmwareでKali Linux(kali-linux-2020.3-vmware-amd64)を使用しています。 Aircrack-ngをインストールしようとしています(私の研究では、Aircrack-ngがプリインストールされている可能性があります)、いくつかのエラーが発生します。前提条件をインストールして、「make」問題と提案された関連問題(再帰エラー1)を解決しようとしましたが、問題は解決しませんでした。また、 "make[2]: *** [Makefile:2988: libaircrack-osdep.la] Error 1" 問題を調査しましたが、システムやヘッダーの更新など、このエラーを解決できませんでした。また、他のソリューションと同様に、「whereis」を使用してaircrack.ngがどこにあるかを確認しました(「sudo apt-get purge aircrack-ng」を削除し、「sudo apt-get install aircrack-ng」を再インストールしてみました)。しかし、makeステートメントが適用されるまで、makeの前のその他のすべてのステップは正常に機能します。
"make"エラーリスト:
make[2]: *** [Makefile:2988: libaircrack-osdep.la] Error 1
make[2]: Leaving directory '/root/aircrack-ng-1.6'
make[1]: *** [Makefile:4802: all-recursive] Error 1
make[1]: Leaving directory '/root/aircrack-ng-1.6'
make: *** [Makefile:2577: all] Error 2
「make」を適用した結果:
root@kali:~/aircrack-ng-1.6# make
make all-recursive
make[1]: Entering directory '/root/aircrack-ng-1.6'
Making all in manpages
make[2]: Entering directory '/root/aircrack-ng-1.6/manpages'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/root/aircrack-ng-1.6/manpages'
Making all in scripts
make[2]: Entering directory '/root/aircrack-ng-1.6/scripts'
make[3]: Entering directory '/root/aircrack-ng-1.6/scripts'
cp "/root/aircrack-ng-1.6/scripts/airmon-ng.linux" "/root/aircrack-ng-1.6/scripts/airmon-ng"
chmod +x "/root/aircrack-ng-1.6/scripts/airmon-ng"
make[3]: Leaving directory '/root/aircrack-ng-1.6/scripts'
make[2]: Leaving directory '/root/aircrack-ng-1.6/scripts'
make[2]: Entering directory '/root/aircrack-ng-1.6'
CC src/aircrack-ng/aircrack_ng-aircrack-ng.o
In file included from /usr/include/string.h:495,
from src/aircrack-ng/aircrack-ng.c:60:
In function ‘strncpy’,
inlined from ‘main’ at src/aircrack-ng/aircrack-ng.c:6246:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/aircrack-ng/aircrack-ng.c: In function ‘main’:
src/aircrack-ng/aircrack-ng.c:6246:5: note: length computed here
6246 | strncpy(opt.logKeyToFile, optarg, strlen(optarg));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
from src/aircrack-ng/aircrack-ng.c:60:
In function ‘strncpy’,
inlined from ‘main’ at src/aircrack-ng/aircrack-ng.c:6290:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/aircrack-ng/aircrack-ng.c: In function ‘main’:
src/aircrack-ng/aircrack-ng.c:6290:5: note: length computed here
6290 | strncpy(opt.hccapx, optarg, strlen(optarg));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
from src/aircrack-ng/aircrack-ng.c:60:
In function ‘strncpy’,
inlined from ‘main’ at src/aircrack-ng/aircrack-ng.c:6275:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/aircrack-ng/aircrack-ng.c: In function ‘main’:
src/aircrack-ng/aircrack-ng.c:6275:5: note: length computed here
6275 | strncpy(opt.hccap, optarg, strlen(optarg));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
from src/aircrack-ng/aircrack-ng.c:60:
In function ‘strncpy’,
inlined from ‘main’ at src/aircrack-ng/aircrack-ng.c:5961:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound 122 equals destination size [-Wstringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
inlined from ‘main’ at src/aircrack-ng/aircrack-ng.c:6260:5:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/aircrack-ng/aircrack-ng.c: In function ‘main’:
src/aircrack-ng/aircrack-ng.c:6260:5: note: length computed here
6260 | strncpy(opt.wkp, optarg, strlen(optarg));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CCLD libaircrack-osdep.la
/usr/bin/ld: ./.libs/libradiotap.a(radiotap.o):(.bss+0x0): multiple definition of `__packed'; lib/osdep/.libs/libaircrack_osdep_la-linux.o:(.bss+0x18): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:2988: libaircrack-osdep.la] Error 1
make[2]: Leaving directory '/root/aircrack-ng-1.6'
make[1]: *** [Makefile:4802: all-recursive] Error 1
make[1]: Leaving directory '/root/aircrack-ng-1.6'
make: *** [Makefile:2577: all] Error 2
追加情報: "./configure --with-experimental"を使用した場合の結果:
root@kali:~/aircrack-ng-1.6# ./configure --with-experimental
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking dependency style of gcc... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking Default static library search path... /usr/lib/gcc/x86_64-linux-gnu/10/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/10/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/x86_64-linux-gnu/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/../lib/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/10/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib/ /lib/x86_64-linux-gnu/10/ /lib/x86_64-linux-gnu/ /lib/../lib/ /usr/lib/x86_64-linux-gnu/10/ /usr/lib/x86_64-linux-gnu/ /usr/lib/../lib/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/lib/ /usr/lib/gcc/x86_64-linux-gnu/10/../../../ /lib/ /usr/lib/ /opt/lib/x86_64-linux-gnu /opt/lib /usr/local/lib/x86_64-linux-gnu /usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /lib /opt/lib/x86_64-linux-gnu /opt/lib
checking for OPENSSL_init in -lcrypto... yes
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking whether compiling and linking against OpenSSL works... yes
checking whether gcrypt is enabled...
checking for OpenSSL or libgcrypt... OpenSSL
checking openssl/cmac.h usability... yes
checking openssl/cmac.h presence... yes
checking for openssl/cmac.h... yes
checking for ethtool... /usr/sbin/ethtool
checking for libnl-3.0 >= 3.2... yes
checking for expect... /usr/bin/expect
checking for python... python
checking for greadlink... no
checking for readlink... readlink
checking for hwloc... no
checking pcap header directories... not found
checking pcap.h usability... no
checking pcap.h presence... no
checking for pcap.h... no
checking for libpcre... no
checking for rfkill... /usr/sbin/rfkill
checking for SQLite3 header... not found
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking for zlib... yes
checking for cmocka... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS... yes
checking whether gcc is Clang... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for pthread_create in -lpthread... yes
checking for pthread_setaffinity_np... yes
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for dlopen in -ldl... yes
checking for sin in -lm... yes
checking for posix_memalign... yes
checking whether to build with code coverage support... no
checking for valgrind... no
checking for C compiler vendor... gnu
checking for C compiler version... 10.2.0
checking CFLAGS for maximum warnings... -Wall
checking CXXFLAGS for maximum warnings... -Wall
checking whether C compiler accepts -O3... yes
checking whether C compiler accepts -std=gnu99... yes
checking whether C compiler accepts -fno-strict-aliasing... yes
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Wstrict-overflow=2... yes
checking whether C compiler accepts -fvisibility=hidden... yes
checking whether C compiler accepts -fstack-protector-strong... yes
checking whether C compiler accepts -Wno-unused-but-set-variable... yes
checking whether C compiler accepts -Wno-array-bounds... yes
checking for C++ compiler vendor... gnu
checking for C++ compiler version... 10.2.0
checking CFLAGS for maximum warnings... (cached) -Wall
checking CXXFLAGS for maximum warnings... (cached) -Wall
checking whether C++ compiler accepts -O3... yes
checking whether C++ compiler accepts -fvisibility=hidden... yes
checking whether C++ compiler accepts -fstack-protector-strong... yes
checking whether C++ compiler accepts -Wno-unused-but-set-variable... yes
checking whether C++ compiler accepts -Wno-array-bounds... yes
checking for C compiler vendor... (cached) gnu
checking for C compiler version... (cached) 10.2.0
checking whether C compiler accepts -mavx2... yes
checking whether C compiler accepts -mavx... yes
checking whether C compiler accepts -msse2... yes
checking whether C compiler accepts -mmmx... yes
checking for C++ compiler vendor... (cached) gnu
checking for C++ compiler version... (cached) 10.2.0
checking whether C++ compiler accepts -masm=intel... yes
checking whether C++ compiler accepts -mavx2... yes
checking whether C++ compiler accepts -mavx... yes
checking whether C++ compiler accepts -msse2... yes
checking whether C++ compiler accepts -mmmx... yes
checking for malloc in -lduma... no
checking for C compiler vendor... (cached) gnu
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating VERSION
config.status: creating include/aircrack-ng/version.h
config.status: creating manpages/airbase-ng.8
config.status: creating manpages/aircrack-ng.1
config.status: creating manpages/airdecap-ng.1
config.status: creating manpages/airdecloak-ng.1
config.status: creating manpages/aireplay-ng.8
config.status: creating manpages/airmon-ng.8
config.status: creating manpages/airodump-ng.8
config.status: creating manpages/airodump-ng-oui-update.8
config.status: creating manpages/airolib-ng.1
config.status: creating manpages/airserv-ng.8
config.status: creating manpages/airtun-ng.8
config.status: creating manpages/airventriloquist-ng.8
config.status: creating manpages/besside-ng.8
config.status: creating manpages/besside-ng-crawler.1
config.status: creating manpages/buddy-ng.1
config.status: creating manpages/easside-ng.8
config.status: creating manpages/ivstools.1
config.status: creating manpages/kstats.1
config.status: creating manpages/Makefile
config.status: creating manpages/makeivs-ng.1
config.status: creating manpages/packetforge-ng.1
config.status: creating manpages/tkiptun-ng.8
config.status: creating manpages/wesside-ng.8
config.status: creating manpages/wpaclean.1
config.status: creating scripts/Makefile
config.status: creating scripts/airdrop-ng/Makefile
config.status: creating scripts/airdrop-ng/doc/Makefile
config.status: creating scripts/airgraph-ng/Makefile
config.status: creating scripts/airgraph-ng/man/Makefile
config.status: creating scripts/versuck-ng/Makefile
config.status: creating test/test-env.sh
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
aircrack-ng 1.6.0
Build Environment:
Build Machine: x86_64-pc-linux-gnu
Host Machine: x86_64-pc-linux-gnu
Target Machine: x86_64-pc-linux-gnu
Install Prefix: /usr/local
Compiler Environment:
C Compiler: gcc
C++ Compiler: g++
Python: python
CFLAGS:
CXXFLAGS:
CPPFLAGS: -D_FORTIFY_SOURCE=2
LDFLAGS:
LIBS: -ldl -lm
Optimized CFLAGS: -Wall -O3 -std=gnu99 -fno-strict-aliasing -Wpointer-arith -Wstrict-overflow=2 -Wstrict-prototypes -fvisibility=hidden -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds
Optimized CXXFLAGS: -Wall -O3 -fvisibility=hidden -fstack-protector-strong -Wno-unused-but-set-variable -Wno-array-bounds -masm=intel
Optimized CPPFLAGS:
Optimized LIBS:
Target Environment:
OS: linux
ASAN: no
CPU L1 cache-line size: 64
Crypto Libraries:
Crypto Engine: openssl
Gcrypt:
OpenSSL: -lssl -lcrypto
Required Libraries:
Ethtool: yes, found /usr/sbin/ethtool
Libnl: yes, found libnl-3.0
Optional Libraries:
Airpcap: no
Cmocka: no
DUMA: no
Hwloc: no
Jemalloc: no
Pcap: no
Pcre: no
Sqlite: no
Tcmalloc: no
Zlib: yes
Features:
CMAC Support: yes
Experimental Extra Scripts: no
Experimental Features: yes
どんな助けでも大変感謝します。
答え1
Kali Linuxには、「sudo apt install Aircrack-ng」コマンドを使用してAircrackをインストールするオプションがあります。これで、rootモードで「man Aircrack-n」コマンドを実行すると、マニュアルページが表示されるので機能します。
誰でも私の答えを確認していただきありがとうございます。ありがとうございます。
答え2
私も同じ問題があり、解決しました。
sudo apt remove aircrack-ng
sudo apt autoclean && sudo apt autoremove
sudo apt install hwloc
ついに:
sudo apt install aircrack-ng