安装 aircrack-ng 时出现问题(make:*** [all-recursive] 错误 1)

安装 aircrack-ng 时出现问题(make:*** [all-recursive] 错误 1)

我正在尝试安装 aircrack-ng,但在安装过程中遇到问题。正常流程如下

wget https://download.aircrack-ng.org/aircrack-ng-1.4.tar.gz
tar -zxvf aircrack-ng-1.4.tar.gz
cd aircrack-ng-1.4
autoreconf -i
./configure --with-experimental
make
make install

我正常地执行了前三个步骤。然后我执行了autoreconf -i

patatoide@PotatoePC:~/git/aircrack-ng-1.4$ autoreconf -i
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build/m4/stubs'.
libtoolize: copying file 'build/m4/stubs/libtool.m4'
libtoolize: copying file 'build/m4/stubs/ltoptions.m4'
libtoolize: copying file 'build/m4/stubs/ltsugar.m4'
libtoolize: copying file 'build/m4/stubs/ltversion.m4'
libtoolize: copying file 'build/m4/stubs/lt~obsolete.m4'
configure.ac:69: installing './compile'
configure.ac:50: installing './config.guess'
configure.ac:50: installing './config.sub'
configure.ac:60: installing './install-sh'
configure.ac:60: installing './missing'
src/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'`

之后,我./configure --with-experimental

patatoide@PotatoePC:~/git/aircrack-ng-1.4$  ./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... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
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 for style of include used by make... GNU
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... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /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... /bin/dd
checking how to truncate binary pipes... /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 for OPENSSL_init in -lcrypto... no
checking for pkg-config... /usr/bin/pkg-config
checking for openssl/ssl.h in /usr/local/ssl... 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... no
checking openssl/cmac.h presence... no
checking for openssl/cmac.h... no
checking for ethtool... /sbin/ethtool
checking for LIBNL3X... yes
checking for python3... /usr/bin/python3
checking for python3-config... no
checking for Python prefix... /usr
checking for Python site-packages directory... lib/python3.5/site-packages
checking if Python >= '2.7'... yes
checking if Python <= '4.0'... yes
checking for greadlink... no
checking for readlink... readlink
checking for HWLOC... no
checking pcap header directories... /usr/include/pcap
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_open_live in -lpcap... yes
checking for PCRE... no
checking for rfkill... /usr/sbin/rfkill
checking for SQLite3 header... found; /usr/include/sqlite3.h
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking for sqlite3_open in -lsqlite3... yes
checking for SQLite3 library version >= 3.0.0... yes
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 whether to build with code coverage support... no
checking for valgrind... no
checking for C compiler vendor... gnu
checking for C compiler version... 6.3.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 -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... 6.3.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) 6.3.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) 6.3.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 manpages/Makefile
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 src/Makefile
config.status: creating src/aircrack-crypto/Makefile
config.status: creating src/aircrack-util/Makefile
config.status: creating src/include/Makefile
config.status: creating src/aircrack-osdep/Makefile
config.status: creating src/aircrack-osdep/radiotap/Makefile
config.status: creating test/Makefile
config.status: creating test/test-env.sh
config.status: creating test/cryptounittest/Makefile
config.status: creating test/unit/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands

aircrack-ng 1.4

  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:                      /usr/bin/python3

    CFLAGS:
    CXXFLAGS:
    CPPFLAGS:                     -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_FORTIFY_SOURCE=2
    LDFLAGS:
    LIBS:                         -ldl -lm

    Optimized CFLAGS:              -Wall -O3 -std=gnu99 -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:
    Gcrypt:
    OpenSSL:                     -lssl -lcrypto

  Required Libraries:
    Ethtool:                     yes, found /sbin/ethtool
    Libnl:                       yes, found libnl-3.0

  Optional Libraries:
    Airpcap:                     no
    Cmocka:                      no
    DUMA:                        no
    Hwloc:                       no
    Jemalloc:                    no
    Pcap:                        yes
    Pcre:                        no
    Sqlite:                      yes
    Tcmalloc:                    no
    Zlib:                        yes

  Features:
    CMAC Support:                no
    Experimental Extra Scripts:  no
    Experimental Features:       yes
'

遗憾的是,我遇到了让我困惑的部分。我引入了 make,这是输出:

patatoide@PotatoePC:~/git/aircrack-ng-1.4$ make
Making all in manpages
make[1]: Entering directory '/home/patatoide/git/aircrack-ng-1.4/manpages'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/patatoide/git/aircrack-ng-1.4/manpages'
Making all in scripts
make[1]: Entering directory '/home/patatoide/git/aircrack-ng-1.4/scripts'
make[2]: Entering directory '/home/patatoide/git/aircrack-ng-1.4/scripts'
cp "/home/patatoide/git/aircrack-ng-1.4/scripts/airmon-ng.linux" "/home/patatoide/git/aircrack-ng-1.4/scripts/airmon-ng"
chmod +x "/home/patatoide/git/aircrack-ng-1.4/scripts/airmon-ng"
make[2]: Leaving directory '/home/patatoide/git/aircrack-ng-1.4/scripts'
make[1]: Leaving directory '/home/patatoide/git/aircrack-ng-1.4/scripts'
Making all in src
make[1]: Entering directory '/home/patatoide/git/aircrack-ng-1.4/src'
Making all in aircrack-crypto
make[2]: Entering directory '/home/patatoide/git/aircrack-ng-1.4/src/aircrack-crypto'
  CC       libaircrack_crypto_la-memory.lo
  CC       libaircrack_crypto_la-sha1-git.lo
  CC       libaircrack_crypto_la-wpapsk.lo
  CC       libaircrack_crypto_la-crypto_engine.lo
  CPPAS    sha1-sse2.lo
  CCLD     libaircrack-crypto.la
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
Makefile:878: recipe for target 'libaircrack-crypto.la' failed
make[2]: *** [libaircrack-crypto.la] Error 1
make[2]: Leaving directory '/home/patatoide/git/aircrack-ng-1.4/src/aircrack-crypto'
Makefile:1931: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/patatoide/git/aircrack-ng-1.4/src'
Makefile:585: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

有人能告诉我错误在哪里以及如何修复它吗? :( 对不起,我是 Linux 新手,但我会尽可能多地学习

答案1

相关错误如下:

/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto

您缺少名为libcrypto.{a,so}和 的库libssl.{a,so}

它们位于libssl-dev我的 Ubuntu 16.04.5 的包中。

sudo apt install libssl-dev

并从该autoreconf -i步骤重新开始。

相关内容