Fresh Install RPi python 2 error [solved]

I have downloaded the December 2018 image and done a fresh install of OSMC on my RPi Model 2. (After a summer power cut the FAT32 boot partition was corrupted and the dirty bit was set. Even running chkdsk from a windows 7 PC could not fix it, though windows said the partition was good.)

OSMC is working well and I can reboot and SSH without problems, out of interest I thought I’d see what grab-logs - said about my system.

However if I try the command I get this error:

osmc@osmc:~$ grab-logs -A
python2: error while loading shared libraries: ���T�����?
�->:����: cannot open shared object file: No such file or directory

Running python2 shows the same error?

osmc@osmc:~$ python2
python2: error while loading shared libraries: ���T�����?
�->:����: cannot open shared object file: No such file or directory

This has been copied and pasted from a SSH session.
How can I fix this?

Thanks in advance

It looks like something else might have become corrupted by the power cut.

Please run the following and post the output:

sudo ldconfig
ldd /usr/bin/python2

Here is the output:

osmc@osmc:~$ sudo ldconfig
osmc@osmc:~$ ldd /usr/bin/python2
/usr/bin/python2: error while loading shared libraries: /usr/bin/python2: unsupported version 53246 of Verneed record

I wonder if the card was not fully erased?
verneed is version needed, (of what library I don’t know?) but I do not mind reformatting
if you think its best.

I installed by using dd from my linux labtop, where sdb is the whole sd card.

gzip -dc OSMC_TGT_rbp2_20190105.img.gz | pv | sudo dd of=/dev/sdb && sync

Once in the RPi, it decompressed the image and expanded onto the SDcard ext4
partition. I never erased the ext4 partition. Maybe Iit would have been better to
sudo rm -rf /dev/sdb2 on the ext4 partition when mounted on a linux system.

I’ll await your advice and thanks again for all the help.

It’s difficult to say exactly what’s borked but the simplest path to take is a reinstall, ideally on a new card, since this could be a hardware-related issue.

The gzip -> dd command looks reasonable but it might be worth removing the two partitions on the card first, eg using fdisk.

It’s probably also worth checking the md5 of the file, just in case: a995549a240a9b3bd195a5781e50b2e8

Yes , I’ll go for a reinstall. I dont have a spare card at the moment but will remove partitios
with fdisk , check the md5sum and reinstall.
Thanks again for all your help.

Well erased all data and merged into partition with linux fdisk,
and reinstallled, and it works! python default branch is 2.7.13
and all seems ok.
Thanks for all your help.