1

I'm getting an error at runtime when running a vendor program. I've been getting several dynamic lib errors, and have been walking through and solving each one. I am stuck on 'python3'

I am running CentOS 7.6.

The error I am getting is:

error while loading shared libraries: libpython3.so: cannot open shared object file: No such file or directory

Usually I expect to search for the package, install it, and then add any paths as necessary.

  1. I tried ldd, but the vendor file isn't a dynamic executable.
  2. LD_LIBARY_PATH is set to /user/local/lib:/opt/lib:/usr/lib:/lib
  3. If I run python3.6 -V, I get 'Python 3.6.7' which indicates python 3.* is installed.
  4. I search from / for: python3*so and there are no libraries on my disk

Searches reveal specific python library versions, but not a generic python3, I'm missing something. How do I install and resolve the python3 library dependency?

5
  • 1
    The default CentOS 7.6 Python3 is python3-3.3.2, currently python3-3.3.2-12.el7.x86_64, and the connected python3-libs-3.3.2 provides libpython3.so. The version you have is a non-standard ? How was it installed ? If it was a package, you can do like $ rpm -qa | grep -i python3 ... to get the package name. Apr 21, 2019 at 19:10
  • I followed these instructions: rosehosting.com/blog/how-to-install-python-3-6-4-on-centos-7 When I run that command, there is no libpython3.so. I only have python36u*.
    – Joe
    Apr 21, 2019 at 19:54
  • 1
    OK, python36u-libs-3.6.7-1.ius.el7.x86_64 provides /usr/lib64/libpython3.6m.so.1.0. ... You can try making a symlink : # cd /usr/lib64/ && ln -s libpython3.6m.so.1.0 libpython3.so ... ... May work, or may not work with your program. Apr 21, 2019 at 21:04
  • Worked. Is this an error with the vendor? I can mark as answer if you post it, or I can delete this.
    – Joe
    Apr 21, 2019 at 22:01
  • Not an error with the vendor software. I.e. they created the program for CentOS 7, which have libpython3.so by default. About "AdditionalResources" wiki.centos.org/AdditionalResources/Repositories → "The ... warnings about updates and priorities should still be heeded." Apr 21, 2019 at 22:34

1 Answer 1

1

Ref. the "ius repo" : https://dl.iuscommunity.org/pub/ius/stable/Redhat/7/x86_64/repoview/python36u.html and https://dl.iuscommunity.org/pub/ius/stable/Redhat/7/x86_64/repoview/python36u-libs.html

python36u-libs-3.6.7-1.ius.el7.x86_64 provides /usr/lib64/libpython3.6m.so.1.0

You can make a symlink, to create the missing `libpython3.so´

$ cd /usr/lib64/
# ln -s libpython3.6m.so.1.0 libpython3.so

See https://wiki.centos.org/AdditionalResources/Repositories for warnings about updates and priorities when you have installed packages from 3rd party repo´s.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.