• Publicidad

Error instalando módulo DBD::mysql en SunOS 5.10

Aquí encontrarás todo lo que sea específicamente acerca de módulos de Perl. Ya sea que estás compartiendo tu módulo, un manual o simplemente tienes una duda acerca de alguno.

Error instalando módulo DBD::mysql en SunOS 5.10

Notapor robertcr » 2011-08-05 15:37 @693

Saludos a todos

Soy nuevo con lo que respecta con Perl, estoy tratando de instalar el módulo de MySQL pero tengo el siguiente error:

Sintáxis: [ Descargar ] [ Ocultar ]
Using text Syntax Highlighting
[root@monitoreo]#uname -a
SunOS monitoreo 5.10 Generic_144488-04 sun4v sparc SUNW,Sun-Fire-T1000
[root@monitoreo]#perl -MCPAN -e 'install DBD::mysql'
Going to read '/.cpan/Metadata'
  Database was generated on Fri, 05 Aug 2011 04:32:14 GMT
Running install for module 'DBD::mysql'
Running make for C/CA/CAPTTOFU/DBD-mysql-4.019.tar.gz

  CPAN: checksum security checks disabled because Digest::SHA not installed.
  Please consider installing the Digest::SHA module.


WARNING: Many CPAN distributions were archived with GNU tar and some of
them may be incompatible with Solaris tar.  We respectfully suggest you
configure CPAN to use a GNU tar instead ("o conf init tar") or install
a recent Archive::Tar instead;


  CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.019.tar.gz



PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user '' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.PL --testuser=username

I will use the following settings for compiling and testing:

  cflags        (mysql_config) = -I/opt/mysql/mysql/include -m64 -KPIC -g -mt
  embedded      (mysql_config) =
  libs          (mysql_config) = -L/opt/mysql/mysql/lib -lmysqlclient   -lthread -lsocket -lnsl -lm -lrt
  mysql_config  (guessed     ) = mysql_config
  nocatchstderr (default     ) = 0
  nofoundrows   (default     ) = 0
  ssl           (guessed     ) = 0
  testdb        (default     ) = test
  testhost      (default     ) =
  testpassword  (default     ) =
  testsocket    (default     ) =
  testuser      (guessed     ) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Checking if your kit is complete...
Looks good
Using DBI 1.58 (for perl 5.008004 on sun4-solaris-64int) installed in /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI/
Writing Makefile for DBD::mysql
Writing MYMETA.yml and MYMETA.json
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cc -c  -I/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI -I/opt/mysql/mysql/include -m64 -KPIC -g -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3 -xspace -xildoff    -DVERSION=\"4.019\"  -DXS_VERSION=\"4.019\" -KPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"   dbdimp.c
/usr/ucb/cc:  language optional software package not installed
*** Error code 1
make: Fatal error: Command failed for target `dbdimp.o'
  CAPTTOFU/DBD-mysql-4.019.tar.gz
  /usr/ccs/bin/make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
[root@monitoreo]#
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4


¿Alguien podría ayudarme con este problema?

Muchas gracias.
robertcr
Perlero nuevo
Perlero nuevo
 
Mensajes: 4
Registrado: 2011-08-05 15:28 @686

Publicidad

Re: Error instalando módulo DBD::mysql en SunOS 5.10

Notapor explorer » 2011-08-05 17:55 @788

Bienvenido a los foros de Perl en español, robertcr.

Debes leerte la primera parte de este mensaje.

Si no existe ese paquete ya compilado, pues no queda más remedio que probar a compilarlo uno mismo, que es lo que el comando cpan ha intentado hacer, siguiendo tus órdenes. El mensaje de error,
Sintáxis: [ Descargar ] [ Ocultar ]
Using text Syntax Highlighting
/usr/ucb/cc:  language optional software package not installed
Coloreado en 0.000 segundos, usando GeSHi 1.0.8.4

indica que el compilador no ha podido hacer el trabajo, porque faltaba un paquete por instalar.

De todas maneras, no parece un asunto sencillo.

¿No es más rápido bajar al quiosco de la esquina, comprar una revista con una distribución de Linux e instalarla en un PC? Coste: 7€ (revista) + 400€ (PC) + 15€ (1 hora de trabajo). :)
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14477
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España

Re: Error instalando módulo DBD::mysql en SunOS 5.10

Notapor robertcr » 2011-08-08 10:02 @460

Hola

Muchas gracias por la respuesta. El paquete gcc si esta instalado, tocara compilar el paquete a ver como me va.

Jejeje muy buena la opcion de ir al quiosco, pero la mentablemente no se puede, ya que tengo que aplicarlo en Solaris, tengo montado Nagios en el y quiero ver si puedo implementar NCONF para que los compañeros de trabajo puedan manipular la configuracion de forma mas sencilla pero me esta dando error con este modulo y a la hora de compilarlo me dio el error que les comente.

Despues les cuento como me fue.

Gracias
robertcr
Perlero nuevo
Perlero nuevo
 
Mensajes: 4
Registrado: 2011-08-05 15:28 @686

Re: Error instalando módulo DBD::mysql en SunOS 5.10

Notapor robertcr » 2011-08-08 10:16 @469

Una pregunta.

Debido a que el /usr/ucb/cc esta instalado en el servidor, tiene los permisos adecuados y ademas esta en la variable de ambiente de solaris PATH. Por lo que veo Perl es el que no lo esta encontrando.

Habra alguna forma de decirle al Perl donde esta este paquete? como agregarle al Path de perl la ubicacion de este? o si Perl manejara alguna variable de ambiente y por no estar configurado me esta cromando a la hora de compilar?

Gracias

Sintáxis: [ Descargar ] [ Ocultar ]
  1. #make 
  2. cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm 
  3. cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm 
  4. cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod 
  5. cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm 
  6. cc -c -I/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI -I/opt/mysql/include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO -xO3 -xspace -xildoff  -DVERSION=\"4.019\" -DXS_VERSION=\"4.019\" -KPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE"  dbdimp.c 
  7. /usr/ucb/cc: language optional software package not installed 
  8. *** Error code 1 
  9. make: Fatal error: Command failed for target `dbdimp.o' 
  10.  
  11. #env 
  12. HZ= 
  13. SHELL=/usr/bin/bash 
  14. TERM=vt100 
  15. MAIL=/var/mail/root 
  16. PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:/openwin/bin:/usr/ucb 
  17. PWD=/export/home/romeneses/DBD-mysql-4.019 
  18. EDITOR=vi 
  19. SHLVL=1 
  20. HOME=/ 
  21. LOGNAME=root 
  22. _=/usr/bin/env 
  23. OLDPWD=/opt/mysql 
  24.  
  25. #ls -la /usr/ucb/cc 
  26. -r-xr-xr-x  1 root   bin     3487 Jan 21 2005 /usr/ucb/cc 
  27.  
robertcr
Perlero nuevo
Perlero nuevo
 
Mensajes: 4
Registrado: 2011-08-05 15:28 @686

Re: Error instalando módulo DBD::mysql en SunOS 5.10

Notapor robertcr » 2011-08-08 12:13 @551

Saludos

Ya logré pasar el error del compilador. Pero ahora tengo el siguiente

ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64

Me parece que es un parámetro, ¿alguna idea?

Muchas Gracias.

Sintáxis: [ Descargar ] [ Ocultar ]
Using text Syntax Highlighting
  1.  
  2. [root@monitoreo]#/usr/local/bin/perl Makefile.PL --libs="-L/opt/mysql/mysql/lib -lmysqlclient   -lthread -lsocket -lnsl -lm -lrt" --cflags="-I/opt/mysql/mysql/include -m64 -g"
  3.  
  4.  
  5. PLEASE NOTE:
  6.  
  7. For 'make test' to run properly, you must ensure that the
  8. database user '' can connect to your MySQL server
  9. and has the proper privileges that these tests require such
  10. as 'drop table', 'create table', 'drop procedure', 'create procedure'
  11. as well as others.
  12.  
  13. mysql> grant all privileges on test.* to ''@'localhost' identified by 's3kr1t';
  14.  
  15. You can also optionally set the user to run 'make test' with:
  16.  
  17. perl Makefile.PL --testuser=username
  18.  
  19. I will use the following settings for compiling and testing:
  20.  
  21.   cflags        (User's choice) = -I/opt/mysql/mysql/include -m64 -g
  22.   embedded      (mysql_config ) =
  23.   libs          (User's choice) = -L/opt/mysql/mysql/lib -lmysqlclient   -lthread -lsocket -lnsl -lm -lrt
  24.   mysql_config  (guessed      ) = mysql_config
  25.   nocatchstderr (default      ) = 0
  26.   nofoundrows   (default      ) = 0
  27.   ssl           (guessed      ) = 0
  28.   testdb        (default      ) = test
  29.   testhost      (default      ) =
  30.   testpassword  (default      ) =
  31.   testsocket    (default      ) =
  32.   testuser      (guessed      ) =
  33.  
  34. To change these settings, see 'perl Makefile.PL --help' and
  35. 'perldoc INSTALL'.
  36.  
  37. Using DBI 1.616 (for perl 5.008008 on sun4-solaris) installed in /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI/
  38. Writing Makefile for DBD::mysql
  39. Writing MYMETA.yml and MYMETA.json
  40. [root@monitoreo]#make
  41. Skip blib/lib/DBD/mysql.pm (unchanged)
  42. Skip blib/lib/DBD/mysql/GetInfo.pm (unchanged)
  43. Skip blib/lib/DBD/mysql/INSTALL.pod (unchanged)
  44. Skip blib/lib/Bundle/DBD/mysql.pm (unchanged)
  45. gcc -c  -I/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI -I/opt/mysql/mysql/include -m64 -g -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"4.019\"  -DXS_VERSION=\"4.019\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE"   dbdimp.c
  46. dbdimp.c: In function `alloc_param':
  47. dbdimp.c:223: warning: comparison is always false due to limited range of data type
  48. dbdimp.c: In function `alloc_bind':
  49. dbdimp.c:241: warning: comparison is always false due to limited range of data type
  50. dbdimp.c: In function `alloc_fbind':
  51. dbdimp.c:257: warning: comparison is always false due to limited range of data type
  52. dbdimp.c: In function `alloc_fbuffer':
  53. dbdimp.c:272: warning: comparison is always false due to limited range of data type
  54. /usr/local/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI/Driver.xst > mysql.xsi
  55. /usr/local/bin/perl /usr/local/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/local/lib/perl5/5.8.8/ExtUtils/typemap  mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
  56. Warning: duplicate function definition 'do' detected in mysql.xs, line 242
  57. Warning: duplicate function definition 'rows' detected in mysql.xs, line 749
  58. gcc -c  -I/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI -I/opt/mysql/mysql/include -m64 -g -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"4.019\"  -DXS_VERSION=\"4.019\" -fPIC "-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE"   mysql.c
  59. mysql.xs: In function `XS_DBD__mysql__db__ListDBs':
  60. mysql.xs:221: warning: ISO C90 forbids mixed declarations and code
  61. mysql.xs: In function `XS_DBD__mysql__db_do':
  62. mysql.xs:363: warning: comparison is always false due to limited range of data type
  63. mysql.xs:364: warning: comparison is always false due to limited range of data type
  64. mysql.xs: In function `XS_DBD__mysql__db_quote':
  65. mysql.xs:610: warning: ISO C90 forbids mixed declarations and code
  66. Running Mkbootstrap for DBD::mysql ()
  67. chmod 644 mysql.bs
  68. rm -f blib/arch/auto/DBD/mysql/mysql.so
  69. LD_RUN_PATH="/opt/mysql/mysql/lib:/usr/lib" /usr/local/bin/perl myld gcc  -G -L/usr/local/lib -L/opt/gnu/lib dbdimp.o  mysql.o  -o blib/arch/auto/DBD/mysql/mysql.so    \
  70.    -L/opt/mysql/mysql/lib -lmysqlclient -lthread -lsocket -lnsl -lm -lrt        \
  71.  
  72. ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64
  73. ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/mysql/mysql.so
  74. collect2: ld returned 1 exit status
  75. *** Error code 1
  76. make: Fatal error: Command failed for target `blib/arch/auto/DBD/mysql/mysql.so'
  77. [root@monitoreo]#
  78.  
  79.  
Coloreado en 0.001 segundos, usando GeSHi 1.0.8.4
robertcr
Perlero nuevo
Perlero nuevo
 
Mensajes: 4
Registrado: 2011-08-05 15:28 @686

Re: Error instalando módulo DBD::mysql en SunOS 5.10

Notapor explorer » 2011-08-08 14:22 @640

En la línea 45 es donde se hace la compilación de dbdimp.o. Entre las opciones de esa compilación está '-m64', que quiere decir que se debe generar código para 32 o 64 bits según la arquitectura en donde nos encontremos.

El error ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64 quiere decir que el enlazador (ld) se ha encontrado con una biblioteca escrita para 64 bits, pero el resto de bibliotecas está para 32 bits.

Es algo que se conoce desde hace ¡años! (Gracias a Google es fácil encontrar la explicación de estos errores.)
JF^D Perl programming & Raku programming. Grupo en Telegram: https://t.me/Perl_ES
Avatar de Usuario
explorer
Administrador
Administrador
 
Mensajes: 14477
Registrado: 2005-07-24 18:12 @800
Ubicación: Valladolid, España


Volver a Módulos

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados

cron