[SOLVED] Network-osmc was accidentally removed. Help!

I’ve been having some trouble with nfs-server and found advice to purge rpcbind. Looks like it wanted to take network-osmc with it and I didn’t realize until too late. Now I have no networking to get in and reinstall. How can I get out of this mess I’ve made?

osmc@osmc:/etc$ sudo apt-get purge rpcbind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  armv7-connman-osmc armv7-irqbalance-osmc armv7-libafpclient-osmc bluez busybox cifs-utils fake-hwclock iptables kmod libnfnetlink0 libnl-3-200 libnl-genl-3-200
  module-init-tools nano python-dbus python-dbus-dev rbp2-image-3.18.13-1-osmc sudo wireless-firmware-osmc wpasupplicant
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  armv7-network-osmc* nfs-common* nfs-kernel-server* rbp2-device-osmc* rpcbind*
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 1,209 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 56634 files and directories currently installed.)
Removing rbp2-device-osmc (1.2.2) ...
dpkg: error processing package rbp2-device-osmc (--purge):
 subprocess installed pre-removal script returned error exit status 1
Removing nfs-kernel-server (1:1.2.8-9) ...
Purging configuration files for nfs-kernel-server (1:1.2.8-9) ...
dpkg: warning: while removing nfs-kernel-server, directory '/var/lib/nfs/v4recovery' not empty so not removed
dpkg: rpcbind: dependency problems, but removing anyway as you requested:
 nfs-common depends on rpcbind.

Removing rpcbind (0.2.1-6) ...
Purging configuration files for rpcbind (0.2.1-6) ...
dpkg: armv7-network-osmc: dependency problems, but removing anyway as you requested:
 rbp2-device-osmc depends on armv7-network-osmc.

Removing armv7-network-osmc (1.5.5) ...

Messy.

It may be in your APT cache, but I’d recommend:

Downloading network-osmc and putting it on a USB drive (http://apt.osmc.tv/pool/main/a/armv7-network-osmc/armv7-network-osmc_1.5.5_armhf.deb)
Login to console and run:

sudo dpkg -i --force-all network-osmc*

P.S. title of your thread scared me.

I hope this helps a bit!

Sam

I’m pretty scared myself right now, to be honest! haha

I’ve been trying to get into recovery console for a while now with no luck. At least now I’ll know what to try once I get it to work.

Unfortunately the recovery console is not working in the July update due to Kernel changes that we have not been able to unravel yet.

I would download both armv7-network-osmc and armv7-connman-osmc from the following links to a PC and copy them to the fat partition on your SD card:

http://46.37.189.135/osmc/apt/pool/main/a/armv7-connman-osmc/
http://46.37.189.135/osmc/apt/pool/main/a/armv7-network-osmc/

Then boot up again, exit Kodi to log into a local console. Then:

sudo dpkg -i /boot/armv7*.deb

Then reboot. That should get networking up again. Then to fix other dependencies that may be broken:

sudo apt-get -f install rbp2-device-osmc --reinstall
sudo apt-get update && sudo apt-get -f dist-upgrade

(This assumes you have a Pi 2)

BTW removing rpcbind won’t have caused your problem, something you did possibly a long time ago has broken the dependency tree and only now when an auto remove ran did it cause this issue.

I’m on the July update and had to wait for the lights to flicker on the keyboard before holding shift, but I eventually got in.

Thanks for you help, guys. That got me back in.