Archive for the ‘Uncategorized’ Category

h1

error SQLite3 Unable to Open Database File

17/12/2010

Si al hacer un cambio en una base de datos Sqlite3, pese a poder acceder normalmente a la información, no se permite modificarla obteniéndose este error:

SQLite3: Unable to Open Database File

es necesario dar permisos 755 al directorio que lo contiene y 777 (control total) al propio fichero:

chmod -R 755 /opt/xplico
chmod -R 777 /opt/xplico/xplico.db

Fuente: Jaux.net

h1

error c++ crosses initialization of

17/12/2010

Al producirse el siguiente error de compilación en c++:
error: crosses initialization of

frecuentamente producido en una sentencia «switch case», es solucionable mediante la inclusión entre llaves ( {} ) del bloque de código.

swtich (opcion)
case 1: {
cout << "hola" << endl;
break;
}

h1

Errores Perl: REQUIRED module missing: Net::DNS REQUIRED module missing: NetAddr::IP

13/12/2010

Compilando Spamassasin puede ocurrir el siguiente error:

REQUIRED module missing: Net::DNS
REQUIRED module missing: NetAddr::IP
optional module missing: Digest::SHA1
optional module missing: Mail::SPF
optional module missing: IP::Country
optional module missing: Razor2
optional module missing: Net::Ident
optional module missing: IO::Socket::INET6
optional module missing: IO::Socket::SSL
optional module missing: Mail::DKIM
optional module missing: DBI
optional module missing: Encode::Detect

En Ubuntu/Debian los «required» se solucionan instalando las correspondientes librerías de Perl:
$ apt-get install libnet-dns-perl libnetaddr-ip-perl

Fuente: HowtoForge forums

h1

aMsn error: utils/farsight/src/tcl_farsight.c:19:42: error: gst/interfaces/propertyprobe.h: No existe el archivo o directorio

11/12/2010

Al compilar aMsn puede ocurrir el siguiente error:

carlos@pc03:~/downloads/amsn-0.98.4$ make
CC utils/farsight/src/tcl_farsight.o
utils/farsight/src/tcl_farsight.c:19:42: error: gst/interfaces/propertyprobe.h: No existe el archivo o directorio
utils/farsight/src/tcl_farsight.c:20:37: error: gst/interfaces/xoverlay.h: No existe el archivo o directorio
utils/farsight/src/tcl_farsight.c: In function ‘_test_source’:
utils/farsight/src/tcl_farsight.c:584: error: ‘GstPropertyProbe’ undeclared (first use in this function)
utils/farsight/src/tcl_farsight.c:584: error: (Each undeclared identifier is reported only once
utils/farsight/src/tcl_farsight.c:584: error: for each function it appears in.)
utils/farsight/src/tcl_farsight.c:584: error: ‘probe’ undeclared (first use in this function)
utils/farsight/src/tcl_farsight.c: In function ‘set_window_xid’:
utils/farsight/src/tcl_farsight.c:1839: error: ‘GstXOverlay’ undeclared (first use in this function)
utils/farsight/src/tcl_farsight.c:1839: error: ‘xov’ undeclared (first use in this function)
utils/farsight/src/tcl_farsight.c: In function ‘_bus_callback’:
utils/farsight/src/tcl_farsight.c:1882: error: ‘GST_TYPE_X_OVERLAY’ undeclared (first use in this function)
utils/farsight/src/tcl_farsight.c: In function ‘Farsight_Probe’:
utils/farsight/src/tcl_farsight.c:3854: error: ‘GstPropertyProbe’ undeclared (first use in this function)
utils/farsight/src/tcl_farsight.c:3854: error: ‘probe’ undeclared (first use in this function)
make: *** [utils/farsight/src/tcl_farsight.o] Error 1

Se soluciona instalando estas librerías:
root@pc03:/# apt-get install libgupnp-igd-1.0-dev gstreamer0.10-plugins-base-dbg libgstreamer-plugins-base0.10-dev

h1

Error tkConfig.sh No such file or directory

11/12/2010

Si al compilar aMsn ocurre el siguiente error:

./configure: line 3686: /usr/lib/tkConfig.sh: No such file or directory

se soluciona instalando las librerías de desarrollo de TCL/TK

carlos@pc02:/$ sudo apt-get install tk8.5-dev tcl8.5-dev

h1

Java error: Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar

12/11/2010

Si ocurre este error:

carlos@adscompc02:~/master/gimi/Distrib/InstanceMatcher$ ant build
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
Buildfile: build.xml
build:
[javac] Compiling 2 source files to /home/carlos/master/gimi/Distrib/InstanceMatcher/build/classes
BUILD FAILED
/home/carlos/master/gimi/Distrib/InstanceMatcher/build.xml:43: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-6-openjdk/jre"
Total time: 0 seconds

Se soluciona localizando el paquete «tools.jar» y copiándolo a la ubicación donde «ant» lo está buscando:

carlos@adscompc02:~/master/gimi/Distrib/InstanceMatcher$ sudo find / -name tools.jar
/usr/lib/jvm/java-6-sun-1.6.0.22/lib/tools.jar
/usr/lib/jvm/java-1.5.0-gcj-4.4/lib/tools.jar
carlos@adscompc02:~/master/gimi/Distrib/InstanceMatcher$ sudo cp /usr/lib/jvm/java-6-sun-1.6.0.22/lib/tools.jar /usr/lib/jvm/java-6-openjdk/jre/lib/

h1

Error variable or field ‘SHA1PadMessage’ declared void

25/05/2010

Si utilizando las librerías de C++ «hashlib++» se produce este error al compilar:
variable or field ‘SHA1PadMessage’ declared void

se soluciona actualizándolas, a fecha de hoy con la versión del SVN:

svn co https://hashlib2plus.svn.sourceforge.net/svnroot/hashlib2plus/trunk

SVN Hashlib
http://hashlib2plus.sourceforge.net/download.html

h1

Cakephp, como refrescar automáticamente una web

14/03/2010

Para refrescar una web en cakephp (autorefresh o autoreload), basta con incluir el siguiente código en la vista:

<?php $html->meta(null, null, array( ‘http-equiv’ => ‘refresh’, ‘content’ => 5), false); ?>

incluyendo previamente el helper «html» en el controlador.

Fuente
http://planetcakephp.org/aggregator/items/160-cakephp-meta-refresh

h1

Error en Cakephp, no se aplican las CSS o imagenes

14/02/2010

Si al visualizar una aplicación Cakephp en un servidor Apache no se muestran las imagenes o las CSS no se aplican correctamente, probablemente sea necesario comprobar los siguientes parámetros en el fichero de configuración de Apache:

carlos@maq10:/etc/apache2/sites-enabled$ cat 000-default

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride all
</Directory>

</Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>


Así como comprobar que está habilitado el módulo «rewrite» en Apache. Posteriormente reiniciar Apache:

carlos@maq03:~$ sudo /etc/init.d/apache2 restart
[sudo] password for carlos:
* Restarting web server apache2                                                                                                                                                         apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]

Fuente: Cakephp Google group

h1

Compilando ghostpdl, error «X11/Xlib.h X11/Intrinsic.h No such file or directory»

12/12/2009

Compilando aplicaciones, como Ghostpdl para Xplico, puede ocurrir el siguiente error:
error "X11/Xlib.h No such file or directory"
El cuals e soluciona instalando los headers de X11:
$ sudo apt-get install libx11-dev

Otro error puede ser:
In file included from ../gs/base/gdevx.c:19:
../gs/base/x_.h:133:29: error: X11/Intrinsic.h: No such file or directory
../gs/base/x_.h:134:30: error: X11/StringDefs.h: No such file or directory
../gs/base/x_.h:135:25: error: X11/Shell.h: No such file or directory
In file included from ../gs/base/gdevx.c:31:
../gs/base/gdevx.h:28: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gdev_x_resources'
../gs/base/gdevx.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gdev_x_fallback_resources'

Solucionable con:
$ sudo apt-get install libxt-dev libxaw7-dev