Archive for febrero 2012

h1

Error Call to undefined function curl_init()

21/02/2012

Si se produce el siguiente error en PHP:

Notice: Use of undefined constant add_css - assumed 'add_css' in /var/www/joomlatest/plugins/content/sexybookmarks.php on line 49 Fatal error: Call to undefined function curl_init() in /var/www/joomlatest/plugins/content/sexybookmarks.php on line 400

Es necesario instalar el soporte de «curl» en PHP:
$ sudo apt-get install php5-curl

h1

Desactivar «búferes de salida» en PHP para Joomla

19/02/2012

Para desactivar «búferes de salida» («output buffers) en PHP para Joomla es necesario

1º) Crear o editar el fichero «.htaccess» en la raíz de Joomla.

2º) Añadir la siguiente línea:
php_value output_buffering "0"

h1

How to enable SSL in amuleweb

18/02/2012

For accessing through a cyphered connection like SSL to the web interface «amuleweb» of aMule, it is necesary to install a webserver like Apache2, which will act like a reverse proxy. It is needed to complete these steps:

1º) Install Apache

sudo apt-get install apache2

2º) Install the http proxy module of Apache2:

sudo apt-get install libapache2-mod-proxy-html

3º) Enable proxy modules:

sudo a2enmod proxy
sudo a2enmod proxy_http

 

4º) Add these 2 lines for amule configuration in the SSL default site of Apache2:

sudo nano /etc/apache2/sites-enabled/default-ssl

(...)
ServerAdmin webmaster@localhost

ProxyPass /amule/ http://172.26.0.5:4711/
ProxyPass /amule/ http://172.26.0.5:4711/

DocumentRoot /var/www
(...)

5º) Restart Apache2
/etc/init.d/apache2 restart

6º) Browse this address:
https://CHANGE_THIS_FOR_THE_LOCAL_IP_OF_YOUR_SERVER:443/amule/

Remember than for any trouble you can check /var/log/apache2/error.log

h1

monit: Error opening the idfile ‘/var/lib/monit/id’ — No such file or directory

17/02/2012

Si al ejecutar Monit 5.3.2 ocurre el siguiente error:

root@shirley:~# monit
monit: Error opening the idfile '/var/lib/monit/id' -- No such file or directory
Starting monit daemon with http interface at [*:4000]
Monit start delay set -- pause for 120s

Es necesario crear el path que indica:
root@shirley:~# mkdir /var/lib/monit

de modo que al arrancarlo creará la huella de la sesión:
root@shirley:~# monit
monit: generated unique Monit id 61cd39f959ea5fd0ea34b587ab836517 and stored to '/var/lib/monit/id'
Starting monit daemon with http interface at [*:4000]
Monit start delay set -- pause for 120s
root@shirley:~# ps axu | grep monit
root 26000 0.0 0.0 33984 744 ? S 21:11 0:00 monit
root 26002 0.0 0.0 7688 824 pts/1 S+ 21:11 0:00 grep --color=auto monit

y funcionará correctamente. Además, en algunas ocasiones es necesario corregir el path incluido del binario en /etc/init.d/monit

h1

Comprobar si una máquina Linux puede ejecutar máquinas virtuales

14/02/2012

Si se desea comprobar si en un host Linux se pueden ejecutar máquinas virtuales, es necesario correr el siguiente comando:

$ egrep '(vmx|svm)' /proc/cpuinfo

Si devuelve «svm» (Intel) ó «vmx» (AMD), la máquina puede ejecutar máquinas virtuales. Si no, es necesario activar, si el hardware lo permite, la opción en la BIOS.

Fuente: Webupd8

h1

Como marcar como instalado un paquete .deb

11/02/2012

Si al instalar un paquete se queda registrado como parcialmente instalado o mal instalado, o ha fallado una parte de su instalador, pero realmente se ha instalado correctamente, como puede ser este caso:

root@shirley:/var/cache/apt/archives# dpkg -i virtualbox-4.1_4.1.8-75467~Ubuntu~lucid_amd64.deb
(Leyendo la base de datos ... 00%
126367 ficheros y directorios instalados actualmente.)
Preparando para reemplazar virtualbox-4.1 4.1.8-75467~Ubuntu~lucid (usando virtualbox-4.1_4.1.8-75467~Ubuntu~lucid_amd64.deb) ...
* Stopping VirtualBox kernel modules [ OK ]
Desempaquetando el reemplazo de virtualbox-4.1 ...
Configurando virtualbox-4.1 (4.1.8-75467~Ubuntu~lucid) ...
addgroup: El grupo `vboxusers' ya existe como grupo del sistema. Saliendo.
* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS
[ OK ]
* Starting VirtualBox kernel modules [ OK ]
* Starting VirtualBox web service
*
invoke-rc.d: initscript vboxweb-service, action "start" failed.
dpkg: error al procesar virtualbox-4.1 (--install):
el subproceso instalado el script post-installation devolvió el código de salida de error 1

Procesando disparadores para ureadahead ...
Procesando disparadores para shared-mime-info ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
Unknown media type in type 'fonts/package'
Unknown media type in type 'interface/x-winamp-skin'
Procesando disparadores para hicolor-icon-theme ...
Procesando disparadores para python-central ...
Se encontraron errores al procesar:
virtualbox-4.1

root@shirley:/var/cache/apt/archives#

Se puede corregir especificando en la base de datos el estado del paquete:
$ sudo nano /var/lib/dpkg/status
Package: virtualbox-4.1
Status: install ok half installed

h1

Errores compilando Virtualbox

10/02/2012

Si al compilar la versión SVN de Virtualbox,

carlos@shirley:~/tmp/VBsvn/vbox$ ./configure --disable-hardening

se producen los siguientes errores:

Checking for as86:
** as86 (variable AS86) not found!

Checking for bcc:
** bcc (variable BCC) not found!

Checking for libIDL:
** libIDL-config (variable libIDL-config) not found!

Checking for libcurl:
libcurl not found at -lcurl or libcurl headers not found

Checking for xslt:
** xsltproc (variable XSLTPROC) not found!

Checking for mkisofs:
** mkisofs (variable MKISOFS) not found!

Checking for libIDL:
** libIDL-config (variable libIDL-config) not found!

Checking for xslt:
** xsltproc (variable XSLTPROC) not found!

Checking for Xmu:
Xmu not found at -L/usr/X11R6/lib -L/usr/X11R6/lib64 -L/usr/local/lib -lXext -lX11 -lXmu -I/usr/local/include or Xmu headers not found

Checking for libcap library:
libcap not found at -lcap or libcap headers not found

Checking for makeself:
** makeself (variable makeself) not found!

Se solucionan instalando los siguientes paquetes:
sudo apt-get install bin86 bcc xsltproc mkisofs libidl-dev libcurl4-gnutls-dev makeself libcap-dev libsdl1.2-dev libidl-dev mkisofs xsltproc iasl

Mientras, el siguiente error de «pam_appl.h:»,
home/carlos/tmp/VBsvn/vbox/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c:79:31: fatal error: security/pam_appl.h: No such file
or dire ctory compilation terminated.
kmk: *** [/home/carlos/tmp/VBsvn/vbox/out/linux.amd64/release/obj/VBoxAuth/pam/VBoxAuthPAM.o] Error 1

Se soluciona con:
apt-get install libpam0g-dev