Welcome! Log In Create A New Profile

Advanced

Locales problem on Debian @ Kirkwood

Posted by krono 
krono
Locales problem on Debian @ Kirkwood
January 08, 2018 01:19PM
Hi guys,
since few days ago I have some problems with my installation of Debian on NSA325.
When I log in as root through ssh I obtain:

krono@ZION-NAS:~$ su
Password: 
configuration error - unknown item '�B'h�m6i'Lm�if&a�z�' (notify administrator)
configuration error - unknown item '��S' (notify administrator)
configuration error - unknown item '�' (notify administrator)
configuration error - unknown item '*'' (notify administrator)
configuration error - unknown item 'C�QO�IR�"d�!' (notify administrator)
configuration error - unknown item '�' (notify administrator)
configuration error - unknown item '�3'8' (notify administrator)
configuration error - unknown item '�c�;�Gx�R,U%x/G�K�F%jt*weQcd;Ro�|' (notify administrator)
configuration error - unknown item 'c<LO�[l�]d�^g�"}F�!K�' (notify administrator)
configuration error - unknown item 'wu�/Yn�7�+p-�"�|Exo�L' (notify administrator)
configuration error - unknown item 's�(C}pnE,4�n�}`y�9F0nA�9�%�d�r�1�-"\�A�!d1btS�c�i~H0,a�@�d�}�!;c�<�q.`H�t`'';`r�' (notify administrator)
configuration error - unknown item '�h�n0DmT�o!�
                                                �Fa�e6�8Ech#l' (notify administrator)
configuration error - unknown item '�x�GoL]�M�v)'�t�h,�#�]b�$;F#�jRO�ByBd*' (notify administrator)

I understood that it could be a charset problem then:

root@ZION-NAS:/home/krono# locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC=it_IT.UTF-8
LC_TIME=it_IT.UTF-8
LC_COLLATE="C"
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES="C"
LC_PAPER=it_IT.UTF-8
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION="C"
LC_ALL=

and when I run dpkg-reconfigure:

root@ZION-NAS:/home/krono# dpkg-reconfigure locale
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MEASUREMENT = "it_IT.UTF-8",
	LC_PAPER = "it_IT.UTF-8",
	LC_MONETARY = "it_IT.UTF-8",
	LC_NUMERIC = "it_IT.UTF-8",
	LC_TIME = "it_IT.UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg-query: package 'locale' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locale is not installed

What's happening?
Thanks so much!

Ivan
Re: Locales problem on Debian @ Kirkwood
January 08, 2018 02:00PM
krono Wrote:
-------------------------------------------------------
> Hi guys,
> since few days ago I have some problems with my
> installation of Debian on NSA325.
> When I log in as root through ssh I obtain:
>
>
> krono@ZION-NAS:~$ su
> Password: 
> configuration error - unknown item
> '�B'h�m6i'Lm�if&a�z�' (notify
> administrator)
> configuration error - unknown item '��S'
> (notify administrator)
> configuration error - unknown item '�' (notify
> administrator)
> configuration error - unknown item '*'' (notify
> administrator)
> configuration error - unknown item
> 'C�QO�IR�"d�!' (notify administrator)
> configuration error - unknown item '�' (notify
> administrator)
> configuration error - unknown item '�3'8'
> (notify administrator)
> configuration error - unknown item
> '�c�;�Gx�R,U%x/G�K�F%jt*weQcd;Ro�|'
> (notify administrator)
> configuration error - unknown item
> 'c<LO�[l�]d�^g�"}F�!K�' (notify
> administrator)
> configuration error - unknown item
> 'wu�/Yn�7�+p-�"�|Exo�L' (notify
> administrator)
> configuration error - unknown item
> 's�(C}pnE,4�n�}`y�9F0nA�9�%�d�r�1�-"\�A�!d1btS�c�i~H0,a�@�d�}�!;c�<�q.`H�t`'';`r�'
> (notify administrator)
> configuration error - unknown item
> '�h�n0DmT�o!�
>                                                
> �Fa�e6�8Ech#l' (notify administrator)
> configuration error - unknown item
> '�x�GoL]�M�v)'�t�h,�#�]b�$;F#�jRO�ByBd*'
> (notify administrator)
>
>
> I understood that it could be a charset problem
> then:
>
>
> root@ZION-NAS:/home/krono# locale
> locale: Cannot set LC_ALL to default locale: No
> such file or directory
> LANG=C
> LANGUAGE=
> LC_CTYPE="C"
> LC_NUMERIC=it_IT.UTF-8
> LC_TIME=it_IT.UTF-8
> LC_COLLATE="C"
> LC_MONETARY=it_IT.UTF-8
> LC_MESSAGES="C"
> LC_PAPER=it_IT.UTF-8
> LC_NAME="C"
> LC_ADDRESS="C"
> LC_TELEPHONE="C"
> LC_MEASUREMENT=it_IT.UTF-8
> LC_IDENTIFICATION="C"
> LC_ALL=
>
>
> and when I run dpkg-reconfigure:
>
>
> root@ZION-NAS:/home/krono# dpkg-reconfigure
> locale
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale
> settings:
> 	LANGUAGE = (unset),
> 	LC_ALL = (unset),
> 	LC_MEASUREMENT = "it_IT.UTF-8",
> 	LC_PAPER = "it_IT.UTF-8",
> 	LC_MONETARY = "it_IT.UTF-8",
> 	LC_NUMERIC = "it_IT.UTF-8",
> 	LC_TIME = "it_IT.UTF-8",
> 	LANG = "C"
>     are supported and installed on your system.
> perl: warning: Falling back to the standard locale
> ("C").
> locale: Cannot set LC_ALL to default locale: No
> such file or directory
> dpkg-query: package 'locale' is not installed and
> no information is available
> Use dpkg --info (= dpkg-deb --info) to examine
> archive files,
> and dpkg --contents (= dpkg-deb --contents) to
> list their contents.
> /usr/sbin/dpkg-reconfigure: locale is not
> installed
>
>
> What's happening?
> Thanks so much!
>
> Ivan

You typed:

root@ZION-NAS:/home/krono# "dpkg-reconfigure locale"

needs to be:

root@ZION-NAS:/home/krono# dpkg-reconfigure locales
krono
Re: Locales problem on Debian @ Kirkwood
January 08, 2018 02:35PM
Thanks feas! You're right!
But now setting en_US.UTF-8 in dpkg-reconfigure I obtain:

root@NB-krono:/home/krono# dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LC_MEASUREMENT = "it_IT.UTF-8",
	LC_PAPER = "it_IT.UTF-8",
	LC_MONETARY = "it_IT.UTF-8",
	LC_NUMERIC = "it_IT.UTF-8",
	LC_TIME = "it_IT.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LC_TIME = "it_IT.UTF-8",
	LC_MONETARY = "it_IT.UTF-8",
	LC_MEASUREMENT = "it_IT.UTF-8",
	LC_NUMERIC = "it_IT.UTF-8",
	LC_PAPER = "it_IT.UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = (unset),
	LC_TIME = "it_IT.UTF-8",
	LC_MONETARY = "it_IT.UTF-8",
	LC_MEASUREMENT = "it_IT.UTF-8",
	LC_NUMERIC = "it_IT.UTF-8",
	LC_PAPER = "it_IT.UTF-8",
	LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Re: Locales problem on Debian @ Kirkwood
January 08, 2018 04:53PM
Do you have more than one selected on purpose?
krono
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 01:42AM
No, I selected only en_US.UTF-8...

Ivan
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 02:00AM
From what is shown in your post:

krono Wrote:
-------------------------------------------------------
>LANGUAGE = "en_US:en",
> LC_ALL = (unset),
> LC_TIME = "it_IT.UTF-8",
> LC_MONETARY = "it_IT.UTF-8",
> LC_MEASUREMENT = "it_IT.UTF-8",
> LC_NUMERIC = "it_IT.UTF-8",
> LC_PAPER = "it_IT.UTF-8",
> LANG = "C"

You have two formats.

Try "sudo dpkg-reconfigure locales" again and scroll through it all and ensure only "en_US.utf8" is selected.

Even if you had multiple it should have you select again later to choose "en_US.utf8".

So perhaps something got scrambled and making sure only "en_US.utf8" is selected will overwrite it.

If that does not clean it up I would try selecting none the last time and then do "sudo dpkg-reconfigure locales" again with only "en_US.utf8".

Edit:

Just remembered about locals and ssh. You may have differences on the local and remote systems so you might want to check your ssh config.

See here the one with the green check mark number 3.

https://stackoverflow.com/questions/2499794/how-to-fix-a-locale-setting-warning-from-perl



Edited 1 time(s). Last edit at 01/09/2018 02:21AM by feas.
krono
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 11:21AM
Ok feas, I followed your advices and now I have the following:

krono@ZION-NAS:~$ su
Password: 
configuration error - unknown item '�B'h�m6i'Lm�if&a�z�' (notify administrator)
configuration error - unknown item '��S' (notify administrator)
configuration error - unknown item '�' (notify administrator)
configuration error - unknown item '*'' (notify administrator)
configuration error - unknown item 'C�QO�IR�"d�!' (notify administrator)
configuration error - unknown item '�' (notify administrator)
configuration error - unknown item '�3'8' (notify administrator)
configuration error - unknown item '�c�;�Gx�R,U%x/G�K�F%jt*weQcd;Ro�|' (notify administrator)
configuration error - unknown item 'c<LO�[l�]d�^g�"}F�!K�' (notify administrator)
configuration error - unknown item 'wu�/Yn�7�+p-�"�|Exo�L' (notify administrator)
configuration error - unknown item 's�(C}pnE,4�n�}`y�9F0nA�9�%�d�r�1�-"\�A�!d1btS�c�i~H0,a�@�d�}�!;c�<�q.`H�t`'';`r�' (notify administrator)
configuration error - unknown item '�h�n0DmT�o!�
                                                �Fa�e6�8Ech#l' (notify administrator)
configuration error - unknown item '�x�GoL]�M�v)'�t�h,�#�]b�$;F#�jRO�ByBd*' (notify administrator)
root@ZION-NAS:/home/krono# locale 
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

But when I run dpkg-reconfigure locales:

root@ZION-NAS:/home/krono# dpkg-reconfigure locales
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locales is not installed

Then I tried to install locales:

root@ZION-NAS:/home/krono# apt install locales
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libc-l10n
The following NEW packages will be installed:
  libc-l10n locales
0 upgraded, 2 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/4109 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
Selecting previously unselected package libc-l10n.
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libparted2:armel' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

How could I solve?
Thanks.

Ivan

P.S.
I don't know if this could be useful, but due to unknown reasons my NAS had lost DNS settings though nameserver is in /etc/network/interfaces:

root@ZION-NAS:/home/krono# cat /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet static
	address 192.168.1.254
	netmask 255.255.255.0
	gateway 192.168.1.1
	dns-nameservers 192.168.1.1

Thus, to obtain working internet, I removed the symbolic link /etc/resolv.conf and I create this text file:

root@ZION-NAS:/home/krono# cat /etc/resolv.conf 
nameserver 192.168.1.1

Now apt finds respositories.
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 01:21PM
so is locals installed on the nas now?
krono
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 02:51PM
No, this was the apt's answer when I tried to install locales.

root@ZION-NAS:/home/krono# apt install locales
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libc-l10n
The following NEW packages will be installed:
  libc-l10n locales
0 upgraded, 2 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/4109 kB of archives.
After this operation, 13.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
Selecting previously unselected package libc-l10n.
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libparted2:armel' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 03:10PM
Does "apt update" work?
krono
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 03:27PM
Yet, it does.

root@ZION-NAS:/home/krono# apt update
Ign:1 http://ftp.us.debian.org/debian stretch InRelease
Hit:2 http://ftp.us.debian.org/debian stretch Release
Get:5 http://security.debian.org stretch/updates InRelease [63.0 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Fetched 154 kB in 12s (12.7 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
13 packages can be upgraded. Run 'apt list --upgradable' to see them.

And if I start upgrade, I obtain the same output of "apt install locales":

root@ZION-NAS:/home/krono# apt upgrade          
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  base-files dbus iproute iproute2 libdbus-1-3 libicu57 libsqlite3-0
  libssl1.0.2 openssh-client openssh-server openssh-sftp-server rsync
  sensible-utils
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/11.3 MB of archives.
After this operation, 47.1 kB disk space will be freed.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libparted2:armel' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 03:44PM
krono
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 05:04PM
Ok.
It seems that the problem is that I have a lot of corrupted files. I can't recover all of them.
It is possible that USB drive is not sufficiently effective to store the rootfs?

Ivan
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 05:40PM
some times they go bad. some are better than others. You can install a new rootfs on another usb drive and copy your needed files over to it.
Re: Locales problem on Debian @ Kirkwood
January 09, 2018 11:52PM
Ivan

> It is possible that USB drive is not sufficiently
> effective to store the rootfs?

No. That's not the problem.


Have you tried:

apt-get clean
dpkg --clear-avail
rm /var/lib/apt/lists/* --force
dpkg --configure -a

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Locales problem on Debian @ Kirkwood
January 10, 2018 01:09AM
bodhi Wrote:
-------------------------------------------------------
> Ivan
>
> > It is possible that USB drive is not
> sufficiently
> > effective to store the rootfs?
>
> No. That's not the problem.
>
>
> Have you tried:
>
>
> apt-get clean
> dpkg --clear-avail
> rm /var/lib/apt/lists/* --force
> dpkg --configure -a
>

I think he is having bad block issues, My last link pointed to this type fix for dpkg.
Re: Locales problem on Debian @ Kirkwood
January 10, 2018 02:12AM
feas Wrote:
-------------------------------------------------------
> bodhi Wrote:
> -------------------------------------------------------
> > Ivan
> >
> > > It is possible that USB drive is not
> > sufficiently
> > > effective to store the rootfs?
> >
> > No. That's not the problem.
> >
> >
> > Have you tried:
> >
> >
> > apt-get clean
> > dpkg --clear-avail
> > rm /var/lib/apt/lists/* --force
> > dpkg --configure -a
> >
>
> I think he is having bad block issues, My last
> link pointed to this type fix for dpkg.

Ah! In that case just mount the USB on another and do fsck first. And then clean the dpkg.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: