web-dev-qa-db-fra.com

Erreurs Debconf lors de la configuration de mysql-server

Lorsque j'essaie d'exécuter Sudo apt-get upgrade, le message d'erreur ci-dessous s'affiche.

Je reçois également une erreur similaire lors de l’exécution de Sudo reconfigure postfix, que j’ai impérativement besoin d’exécuter car les messages sortants ne fonctionnent plus. J'ai également exécuté Sudo apt-get autoclean, Sudo apt-getclean, Sudo apt-get install debconf --reinstall et Sudo apt-get install -f sans succès.

magento@ubuntu:~$ Sudo apt-get install debconf --reinstall
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.5.0-17 linux-headers-3.5.0-17-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca mailx
The following packages will be upgraded:
  mysql-server-5.5
1 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
28 not fully installed or removed.
Need to get 149 kB/8,990 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://no.archive.ubuntu.com/ubuntu/ quantal/main debconf all 1.5.46ubuntu1     [149 kB]
Fetched 149 kB in 0s (472 kB/s)
Use of uninitialized value in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line     46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
(Reading database ... 81482 files and directories currently installed.)
Preparing to replace mysql-server-5.5 5.5.28-0ubuntu0.12.10.1 (using .../mysql-    server-5.5_5.5.28-0ubuntu0.12.10.2_AMD64.deb) ...
Use of uninitialized value in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line     46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Use of uninitialized value in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line     46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.28-    0ubuntu0.12.10.2_AMD64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Use of uninitialized value in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line     46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at     /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
   Errors were encountered while processing:
    /var/cache/apt/archives/mysql-server-5.5_5.5.28-0ubuntu0.12.10.2_AMD64.deb
   E: Sub-process /usr/bin/dpkg returned an error code (1)

Exécuter Ubuntu 12.10.

La commande df donne:

Filesystem                 1K-blocks    Used Available Use% Mounted on
/dev/mapper/magento-root  53613052 6529812  44359812  13% /
udev                         3978932       4   3978928   1% /dev
tmpfs                        1595380     264   1595116   1% /run
none                            5120       0      5120   0% /run/lock
tmpfs                        3988440       0   3988440   0% /run/shm
none                          102400       0    102400   0% /run/user
/dev/sda1                     233191   53511    167239  25% /boot

J'ai semblé post où il a suggéré de ne pas utiliser tmpfs pour/var/cahce, si tel est le problème, comment puis-je configurer Ubuntu pour utiliser mon disque dur (et SSD) pour/var/cache.

Merci d'avance pour toute aide, et pardonnez-moi pour mon nouveau-né ..

Mise à jour:

Fonctionnement

Sudo apt-get update --fix-missing
Sudo apt-get autoremove && Sudo apt-get clean && Sudo apt-get install -f

donne:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  mysql-server-5.5
Suggested packages:
  tinyca mailx
The following packages will be REMOVED:
  linux-headers-3.5.0-17 linux-headers-3.5.0-17-generic
The following packages will be upgraded:
  mysql-server-5.5
1 upgraded, 0 newly installed, 2 to remove and 8 not upgraded.
28 not fully installed or removed.
Need to get 0 B/8,840 kB of archives.
After this operation, 69.9 MB disk space will be freed.
Do you want to continue [Y/n]? y
Use of uninitialized value in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line         46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
(Reading database ... 81482 files and directories currently installed.)
Preparing to replace mysql-server-5.5 5.5.28-0ubuntu0.12.10.1 (using .../mysql-        server-5.5_5.5.28-0ubuntu0.12.10.2_AMD64.deb) ...
Use of uninitialized value in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line         46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Use of uninitialized value in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line         46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error processing /var/cache/apt/archives/mysql-server-5.5_5.5.28-         0ubuntu0.12.10.2_AMD64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Use of uninitialized value in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 44, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in -e at /usr/share/Perl5/Debconf/DbDriver/File.pm line         46, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value in pattern match (m//) at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 47, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in -d at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 48, <DEBCONF_CONFIG> chunk 3.
Use of uninitialized value $directory in concatenation (.) or string at         /usr/share/Perl5/Debconf/DbDriver/File.pm line 49, <DEBCONF_CONFIG> chunk 3.
debconf: DbDriver "config": mkdir :No such file or directory
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.5_5.5.28-0ubuntu0.12.10.2_AMD64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)  
6
audunms

Je suppose que je suis un peu en retard ... mais je le posterai quand même, au cas où quelqu'un viendrait chercher la solution au même problème.

debconf: DbDriver "config": mkdir :No such file or directory signifie que debconf est absent de son répertoire dans /var/cache qui a été supprimé d'une manière ou d'une autre (il est toujours impossible de comprendre comment, vu que cela fonctionnait bien avant).

Une solution évidente serait de le recréer (Sudo mkdir /var/cache/debconf), ou de réinstaller debconf à partir du paquet (ce n’est vraiment pas nécessaire).

15
Cthulhu

J'ai eu ce problème (Ubuntu 13.04), c'est parce que j'ai délété (accidentellement)/var/cache/debconf recréé tout était à nouveau pêché ... donc:/var/cache/debconf: manquant = mauvais présent = bon

PS: copier et coller si vous êtes paresseux comme moi:

 Sudo mkdir/var/cache/debconf

et j'ai trouvé que certains outils prétendant nettoyer les disques durs effacent des dossiers vides dans des emplacements tels que/var/cache, alors ...

Sudo touch /var/cache/debconf/.dont-delete-this-directory

lequel bien sûr, alors rmdir sera bloqué quand quelqu'un/quelque chose entrera et essaiera de s'en débarrasser ... bien sûr, l'utilisateur expérimenté sait qu'il ne faut JAMAIS utiliser les outils d'optimisation, en particulier les systèmes basés sur -nix, il est préférable de laisser ce genre de conneries à la foule de -dows et à leurs débutants, donc la plupart des gens qui liront ceci riront probablement à la pensée de le faire ... moi-même inclus (je m'ennuie juste, je suppose). J'espère que cela t'aides.

3
osirisgothra