Erreur Perl avec APT : warning : Setting locale failed.

Suite a l’annonce d’un Important bug de sécurité sur noyau 2.6.17 à 2.6.24 sur linuxfr.org je colle le nez sur mes serveurs pour faire un brin de ménage.

Ménage avec apt-get remove

J’en profite pour virer de vieux paquet et la, sur un serveur de test et bibouille, c’est le drame !!

apt-get remove --purge linux-image<span style="color: #000000;">-2.6</span><span style="color: #000000;">-686</span> Reading package lists... Done Building dependency tree... Done The following packages will be REMOVED: linux-image<span style="color: #000000;">-2.6</span><span style="color: #000000;">-686</span><span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000;">0</span> upgraded, <span style="color: #000000;">0</span> newly installed, <span style="color: #000000;">1</span> to remove and <span style="color: #000000;">45</span> not upgraded. Need to get 0B of archives. After unpacking 8192B disk space will be freed. Do you want to <span style="color: #7a0874; font-weight: bold;">continue</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Y<span style="color: #000000; font-weight: bold;">/</span>n<span style="color: #7a0874; font-weight: bold;">&#93;</span>? y <span style="color: #c20cb9; font-weight: bold;">perl</span>: warning: Setting locale failed. <span style="color: #c20cb9; font-weight: bold;">perl</span>: warning: Please check that your locale settings: LANGUAGE = <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">unset</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, LC_ALL = <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">unset</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, LANG = <span style="color: #ff0000;">&quot;fr_FR.UTF-8&quot;</span> are supported and installed on your system. <span style="color: #c20cb9; font-weight: bold;">perl</span>: warning: Falling back to the standard locale <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">&quot;C&quot;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>. locale: Cannot <span style="color: #000000; font-weight: bold;">set</span> LC_CTYPE to default locale: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory locale: Cannot <span style="color: #000000; font-weight: bold;">set</span> LC_MESSAGES to default locale: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory locale: Cannot <span style="color: #000000; font-weight: bold;">set</span> LC_ALL to default locale: No such <span style="color: #c20cb9; font-weight: bold;">file</span> or directory <span style="color: #7a0874; font-weight: bold;">&#40;</span>Reading database ... <span style="color: #000000;">43097</span> files and directories currently installed.<span style="color: #7a0874; font-weight: bold;">&#41;</span> Removing linux-image<span style="color: #000000;">-2.6</span><span style="color: #000000;">-686</span> ...

dpkg-reconfigure locales

J’ai du testé et bibouiller un peu trop sur ce serveur et maintenant plus moyen de le maintenant à jour. C’est pas la première fois que j’ai ce message et d’habitude le solutionne la chose avec un bonne reconfiguration des LOCALES

dpkg-reconfigure locales <span style="color: #000000; font-weight: bold;">//</span> &nbsp; Malheureusement l<span style="color: #ff0000;">'utilisation de __dpkg-reconfigure locales__ débouche sur le même message d'</span>erreur. __Perl__ ne comprend pas ma langue et ne trouve pas les variables nécessaire pour cela. &nbsp; Pas grave on va revenir a la langue universel, au fondamentaux de <span style="color: #c20cb9; font-weight: bold;">perl</span> &nbsp; <span style="color: #000000; font-weight: bold;">///</span><span style="color: #7a0874; font-weight: bold;">&#91;</span>bash<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LC_ALL=</span>C

Parfait, je retente la configuration des locales

dpkg-reconfigure locales <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>dpkg-reconfigure: locales is not installed

Et la j’ai l’air con 😀

J’installe les locales, je les reconfigure, en sifflant d’un air dégagé et je reprend mes activités.