Locale Error While Updating

http://paste.osmc.tv/zewayapeku

Been getting locale errors when updating and the message told me to post here. Logs linked above. Running osmc on pi3. Tried several commands via ssh, but they wouldn’t work and instead gave messages along the lines of “locale broken”

Thanks!

I first thought you might have a corrupted download file but the problem has occurred with two versions of locales. So try this:

sudo apt-get purge locales
sudo apt-get update
sudo apt-get install locales

You might also need to run:

sudo dpkg-reconfigure locales

Thanks for the reply. I get the same error i mentioned after using the third command. Here’s a pastebin below:

It’s using the cached copy of locales, so maybe it was corrupted. Let’s try:

sudo rm /var/cache/apt/archives/locales*
sudo apt-get install --reinstall locales
sudo apt-get purge locales
sudo apt-get install locales

or if that fails

sudo apt-get update && sudo apt-get dist-upgrade

Edit: purge locales first, since it says it’s partially installed.

Still getting the same errors, I appreciate your effort. I’ll post those results later when I get up, feel free to suggest anything else.

Still no luck… osmc@osmc:~$ sudo apt-get purge localesReading package lists... DoneBuildi - Pastebin.com

I have a feeling that something has been corrupted on your system and tracking it down is likely to be unsuccessful - or take an unrealistic amount of time. Seeing lines like:

Setting up locales (2.19-18+deb8u10) ...
Segmentation fault
Segmentation fault
Segmentation fault

just doesn’t inspire confidence in the general state of the operating system!

You can try the following:

sudo dpkg --configure -a
sudo apt-get install -f

but I think the problem will probably remain.

Run sudo apt-get purge locales
and then make sure that there are no locales.* files in /var/lib/dpkg/info

You could also try downloading the package file and manually installing it:

cd
apt-get download locales
sudo dpkg -i locales_2.19-18+deb8u10_all.deb

Short of a full reinstall, there is a “semi-nuclear” option:

sudo dpkg --remove --force-remove-reinstreq locales

followed by sudo apt-get update && sudo apt-get dist-upgrade

but this might completely break the system, so make sure you’ve backed-up everything first.

Edit: added one further option

Still no luck with those option I think I’m going to reinstall. Thanks for all the suggestions.

It was worth a shot but a reinstall now looks like the best option. It might be worth using a new SD card, if you have one.