How to fix Cannot open shared object file libudev.so.0 error on Ubuntu 18.04 Bionic Beaver Linux

Symptoms

error while loading shared libraries: libudev.so.0: Cannot open shared object file: No such file or directory

Solution

To install libudev.so.0 we need to download and install libudev0_175-0ubuntu9 manually. This can be accomplished by using the gdebi command. If you do not have the gdebi command available you can install it by:

$ sudo apt install gdebi-core

Next, download and install the libudev0_175-0ubuntu9 package suitable for your architecture:

64-bit

$ wget http://mirrors.kernel.org/ubuntu/pool/main/u/udev/libudev0_175-0ubuntu9_amd64.deb
$ sudo gdebi libudev0_175-0ubuntu9_amd64.deb

32-bit

$ wget http://mirrors.kernel.org/ubuntu/pool/main/u/udev/libudev0_175-0ubuntu9_i386.deb
$ sudo gdebi libudev0_175-0ubuntu9_i386.deb