The error occurred after the installation of python 3
python3: error while loading shared libraries: libpython3.6m.so.1.0:
cannot open shared object file: No such file or directory
Executing the "ldd" script on the ptyhon3 script showed the below result.
ldd python3
linux-vdso.so.1 => (0x00007ffc06fc5000)
libpython3.6m.so.1.0 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe6651d9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe664e10000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe6653f7000)
I notice the python so library was unable to be found.
To solve the issue, Add the location (directory) of "lippython3.6m.so.1.0" to /etc/ld.so.conf.d/libc.conf file.
ldd python3
linux-vdso.so.1 => (0x00007ffcbc7f4000)
libpython3.6m.so.1.0 => /opt/python3.6/lib/libpython3.6m.so.1.0 (0x00007f633340a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f63331ec000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6332e23000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6332c1f000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f6332a1c000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6332716000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6333943000)