Autor Tema: Me sigue fallando el instalar nemesis en debian wheezy. (SOLUCIONADO)  (Leído 18825 veces)

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Citar
Installing Nemesis on Linux (Error: Libnet Library not found)

    September 15th, 2011
    Posted in Installation . Linux
    Write comment

Fb-Button

This brief post deals with installing the packet injection tool Nemesis on a Debian-like machine which probably causes some issues related to the libnet library.

When trying to compile Nemesis the following error gets thrown:

ERROR!  Libnet library not found, go get it from

http://www.packetfactory.net/projects/libnet/

or use the --with-libnet-* options, if you have it installed
in unusual place

Because the given URL is not available and most of the HowTos I’ve found didn’t really help me much I’ve decided to write this brief post how to fix this. It seems that Nemesis can only be compiled against libnet-1.0.2.a as stated on the Nemesis website ;) . So grab the tar ball from here and compile it. In my case I put libnet to /usr/local/src:

wget http://www.seronline.de/download/libnet-1.0.2a.tar.gz /usr/local/src
cd /usr/local/src
tar -zxvf libnet-1.0.2a.tar.gz
cd libnet-1.0.2a
./configure && make && make install

Now switch into the nemesis folder and use the –with-libnet-* options to specify where it can find libnet:

./configure --with-libnet-includes=/usr/local/src/libnet-1.0.2a/include \ --with-libnet-libraries=/usr/local/src/libnet-1.0.2a/lib
make && make install
Tras seguir bastantes manuales y pasos no consigo instalar nemesis en el s.o.¿Tiene alguna solución?. :-o
Pen

Desconectado Mr_X

  • Moderadores
  • ******
  • Mensajes: 2635
Re:Me sigue fallando el instalar nemesis en debian squeeze.
« Respuesta #1 en: 23 de Abril de 2013, 11:52:36 pm »
¿Es el mismo error que te aparece a ti?
"... I'll wait I sow the seed, I set the scene and I watch the world go by..."

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian squeeze.
« Respuesta #2 en: 04 de Junio de 2013, 11:52:59 pm »
¿Es el mismo error que te aparece a ti?
Me da de salida :
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include \ --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib
configure: error: invalid variable name:  --with-libnet-libraries
¿Qué más puedo hacer?. :-o
Pen

Desconectado Mr_X

  • Moderadores
  • ******
  • Mensajes: 2635
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #3 en: 05 de Junio de 2013, 04:55:46 am »
¿Instalaste libnet-devel? ¿la ruta a libnet es correcta? Se me hace raro que tenga la 'L' en mayúscula: Libnet-1.0.2a

Además, quita esa diagonal en el comando:

Código: [Seleccionar]
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include \ --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib
                                                                        ^

Para que quede así:

Código: [Seleccionar]
./configure --with-libnet-includes=/usr/local/src/Libnet-1.0.2a/include --with-libnet-libraries=/usr/local/src/Libnet-1.0.2a/lib
"... I'll wait I sow the seed, I set the scene and I watch the world go by..."

Desconectado shicefgo

  • Member
  • ***
  • Mensajes: 166
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #4 en: 05 de Junio de 2013, 01:49:50 pm »
Buenas.

Si haces ./configure --help verás las opciones disponibles. Busca alguna que tenga que ver con la librería que te falta. Es que a veces en los foros se explican las cosas en plan «esto y esto», pero sin dar la instrucción o el comando completo, dándolo por sabido.

Si has instalado libnet desde los fuentes en /usr/src/, como pareces dar a entender, tal vez tengas que agregar esa ruta al path de búsqueda del compilador. Si está previsto en el configure, «maravitupendo», pero si no, lo mismo tienes que trastear el propio configure.am (.ac) o algún Makefile.in. Ya se sabe que lo de compilar por cuenta propia siempre es algo más complicado.

También, si no eres experto, sería preferible lanzar los comandos de compilación uno a uno, para ir solucionando las complicaciones más paso a paso. Yo haría primero «./configure», y cuando no diera error haría «make» y cuando no hubiese más errores «make install», en lugar de ./configure && make && make install del tirón y sin respirar.

Y no pongas el nombre de la librería en las instrucciones del tipo «--libnet-include=» pon sólo el path del directorio donde se encuentra. Por ejemplo: /usr/local/src/include o tal vez /usr/local/src/libnet/include y /usr/local/src/libinclude (por dar más o menos una idea). El programa ya conoce el nombre de los archivos que busca, lo que le falta es saber dónde están.

Y una puntualización sobre la barra invertida (sin ánimo de parecer pedante), pero es que eso puede significar que el comando continúa en la línea siguiente. Hay quien lo hace así en lugar de escribirlo todo seguido ocupando varias líneas sin separación. Por lo que si la barra te coincide con el fin de una línea (seguida de un retorno de carro), funcionará, pero si se mete ahí en medio así como así, pues seguramente estorbará.

Saludos.

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #5 en: 05 de Junio de 2013, 07:14:18 pm »
Citar
Nemesis 1.4 Debian wheezy amd64.
:dabo:

He cambiado el nombre de la ruta y lo he simplificado cómo dice shicefgo :  :cansao:
Citar
./configure /usr/local/src/libnet/include /usr/local/src/libnet/lib

Y lo hago también cómo Mr_X :  :???:

Citar
./configure --with-libnet-includes=/usr/local/src/libnet/include --with-libnet-libraries=/usr/local/src/libnet/lib

Y me devuelve esto : (Y con sólo ./configure también devuelve esto).

Citar
./configure /usr/local/src/libnet/include /usr/local/src/libnet/lib
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /usr/local/src/libnet/include
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /usr/local/src/libnet/lib
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... /usr/local/src/libnet/include
checking host system type... /usr/local/src/libnet/include
checking for style of include used by make... GNU
checking for /usr/local/src/libnet/include-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 ANSI C... none needed
checking dependency style of gcc... none
checking for gcc option to accept ANSI C... none needed
checking for /usr/local/src/libnet/include-gcc... gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) none
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
configure: WARNING: Your OS is not officially supported yet
configure: WARNING: Nemesis may not work properly
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for fabs in -lm... yes
checking for inet_ntoa in -lnsl... yes
checking for socket in -lsocket... no
checking for hstrerror in -lresolv... yes
checking for libnet_build_ip in -lnet... no

   ERROR!  Libnet library not found, go get it from
   http://www.packetfactory.net/projects/libnet/
   or use the --with-libnet-* options, if you have it installed
   in unusual place
Estoy ofuscada no se que mas hacer. :-o
Pen

Desconectado Mr_X

  • Moderadores
  • ******
  • Mensajes: 2635
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #6 en: 05 de Junio de 2013, 08:54:59 pm »
Si haces ./configure --help verás las opciones disponibles...

Como lo comenta shicefgo, deberías probar la ayuda del archivo de configuración. También verifica la ruta de libnet...
"... I'll wait I sow the seed, I set the scene and I watch the world go by..."

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #7 en: 05 de Junio de 2013, 09:33:22 pm »
Si haces ./configure --help verás las opciones disponibles...

Como lo comenta shicefgo, deberías probar la ayuda del archivo de configuración. También verifica la ruta de libnet...

Mr_X , gracias estoy abierta a más sugerencias. :cry:
Pen

Desconectado Mr_X

  • Moderadores
  • ******
  • Mensajes: 2635
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #8 en: 05 de Junio de 2013, 09:48:21 pm »
Y ¿qué opciones te muestra la ayuda del configure de nemesis? ¿cómo instalaste libnet?
"... I'll wait I sow the seed, I set the scene and I watch the world go by..."

Desconectado Pengüin

  • Member
  • ***
  • Mensajes: 242
  • www.daboweb.com
Re:Me sigue fallando el instalar nemesis en debian wheezy.
« Respuesta #9 en: 05 de Junio de 2013, 10:15:03 pm »
Y ¿qué opciones te muestra la ayuda del configure de nemesis? ¿cómo instalaste libnet?
Opciones de ./configure de nemesis :
Citar
./configure --help
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
  -h, --help              display this help and exit
      --help=short        display options specific to this package
      --help=recursive    display the short help of all the included packages
  -V, --version           display version information and exit
  -q, --quiet, --silent   do not print `checking...' messages
      --cache-file=FILE   cache test results in FILE [disabled]
  -C, --config-cache      alias for `--cache-file=config.cache'
  -n, --no-create         do not create output files
      --srcdir=DIR        find the sources in DIR [configure dir or `..']

Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
           [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
           [PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --infodir=DIR          info documentation [PREFIX/info]
  --mandir=DIR           man documentation [PREFIX/man]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
  --program-suffix=SUFFIX            append SUFFIX to installed program names
  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --disable-dependency-tracking Speeds up one-time builds
  --enable-dependency-tracking  Do not reject slow dependency extractors
  --enable-debug          enable debugging options (bugreports and developers)
  --enable-profile        enable profiling options (developers only)

Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-libnet-includes=DIR    libnet include directory
  --with-libnet-libraries=DIR   libnet library directory

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  CPP         C preprocessor

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Citar
¿cómo instalaste libnet?
Desde synaptic libnet1-dev e instalando (libnet-1.0.2a.tar.gz). :verysad:
Pen

 

Aviso Legal | Política de Privacidad | Política de Cookies

el contenido de la web se rige bajo licencia
Creative Commons License