Trovandomi ad installare Aircrck-ng, con il classico metodo, ho avuto un sacco di errori:
edmond@Debianbox:~/aircrack-ng-1.1$ make
make -C src all
make[1]: Entering directory `/home/edmond/aircrack-ng-1.1/src'
make -C osdep
make[2]: Entering directory `/home/edmond/aircrack-ng-1.1/src/osdep'
Building for Linux
make[3]: Entering directory `/home/edmond/aircrack-ng-1.1/src/osdep'
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o osdep.o osdep.c
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o network.o network.c
gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0 -fPIC -I.. -c -o linux.o linux.c
linux.c: In function ‘is_ndiswrapper’:
linux.c:165:17: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_rate’:
linux.c:334:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_channel’:
linux.c:807:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘linux_set_freq’:
linux.c:896:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘set_monitor’:
linux.c:1022:22: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘do_linux_open’:
linux.c:1366:12: error: variable ‘unused_str’ set but not used [-Werror=unused-but-set-variable]
linux.c:1352:15: error: variable ‘unused’ set but not used [-Werror=unused-but-set-variable]
linux.c: In function ‘get_battery_state’:
linux.c:1982:35: error: variable ‘current’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[3]: *** [linux.o] Error 1
make[3]: Leaving directory `/home/edmond/aircrack-ng-1.1/src/osdep'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/edmond/aircrack-ng-1.1/src/osdep'
make[1]: *** [osd] Error 2
make[1]: Leaving directory `/home/edmond/aircrack-ng-1.1/src'
make: *** [all] Error 2
il problema è dovuto alla versionde di gcc, che è alla versione 4.6.2 (Debian 4.6.2-3), mentre aircrack-ng deve essere compilato con una versione precedente…io ho usato la 4.4, ma dovrebbe funzionare anche la 4.5.
# gcc -v
quindi non rimane che cambiare versione del compilatore. Se si usa il comando:
# update-alternatives --install /usr/bin/gcc gcc-4.4 /usr/bin/gcc-4.4 20
la risposta sarà:
root@Debianbox:/home/edmond# update-alternatives –install /usr/bin/gcc gcc-4.4 /usr/bin/gcc-4.4 20
update-alternatives: viene usato /usr/bin/gcc-4.4 per fornire /usr/bin/gcc (gcc-4.4) in modalità automatica.
per ritornare alla versione precedente, io ho usato:
# rm /usr/bin/gcc
# ln -sf /usr/bin/gcc-4.6 /usr/bin/gcc
Comunque il pacchetto deb si trova nel repository.
ps:ci sarebbe da mettere anche a posto /etc/alternatives/gcc
enjoy 😉