When trying to run a program in Konsole I get the error message "foo: error while loading shared libraries: libfoo.so.1.2.3: cannot open shared object file: No such file or directory" - what should I do?

soname-bump

(nobody) #1

When trying to run a program in Konsole I get the following error message:

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

What should I do?


Ktorrent can be started and the GUI is displayed but is unresponsive
When trying to run kaudiocreator 1.3-3 I get the error message "kaudiocreator: error while loading shared libraries: libmusicbrainz5.so.0: cannot open shared object file: No such file or directory"
When trying to run cantata 2.2.0-1 I get the error message "cantata: error while loading shared libraries: libmusicbrainz5.so.0: cannot open shared object file: No such file or directory"
GitLab replaces gitolite, cgit, and Flyspray (and other changes)
Digikam fails to start, returns the error message "digikam: error while loading shared libraries: liblensfun.so.0: cannot open shared object file: No such file or directory"
Jupyter console returns "ModuleNotFoundError: No module named 'jupyter_core'" when run after Python update
Sigil 0.9.8-1: /usr/lib/sigil/sigil: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
软件包编译时,boost库不匹配
Running Inkscape fails and returns the error message "error while loading shared libraries: libpoppler.so.78: cannot open shared object file: No such file or directory"
Running Inkscape fails and returns the error message "error while loading shared libraries: libenchant.so.1: cannot open shared object file: No such file or directory"
When trying to run octave I get the error message "/usr/lib/octave/4.2.1/exec/x86_64-unknown-linux-gnu/octave-gui: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory"
When trying to run rstudio 1.0.143-1 I get the error message "/usr/lib/rstudio/bin/rstudio: error while loading shared libraries: libboost_date_time.so.1.63.0: cannot open shared object file: No such file or directory"
(Hans Tovetjärn) #2

When running a program “foo” which depends on a library “libfoo” you may get this error (or a similar one):

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

The files that have a .so file extension are “shared objects”. For example, for a package named libfoo that is version 1.1 these are some usual shared objects:

libfoo.so
libfoo.so.1
libfoo.so.1.1

These are the libraries that other packages like executables will usually need in order to properly run. If the .so files change or are missing, an application will give an error that it cannot find them, and it will not run. Let’s say that a minor update is available for libfoo, version 1.2. These are the new .so files expected to be included:

libfoo.so
libfoo.so.1
libfoo.so.1.2

So the packages that need libfoo.so or libfoo.so.1 will not break and no rebuilds are needed. If any package depends on 1.2 however, it should be rebuilt against this new version. This is rarely a case, but packagers should check to be sure. Usually when a major update is out the major version of the library changes. For example, in libfoo 2.0 it could become:

libfoo.so
libfoo.so.2
libfoo.so.2.0

In this case packagers will probably need to rebuild all the packages that depend on this particular library package, unless they only depend on libfoo.so - which is rarely the case.


If you are a user and have gotten this error, ensure that your system is fully up to date by running pacman -Syu. If it is fully up to date and the issue persists, report it in the appropriate project on our issue tracker by following this procedure, using the package desktop/octave as an example:

  1. Get package versions and error messages by running the following commands in Konsole

    $ pacman -Q octave  # Get the version of the package
    octave 4.2.1-2
    
    $ octave  # Get the error message
    /usr/lib/octave/4.2.1/exec/x86_64-unknown-linux-gnu/octave-gui: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory
    
    $ ls /usr/lib/libgfortran.so*  # Look if there are other files with similar names, such as libgfortran.so
    /usr/lib/libgfortran.so  /usr/lib/libgfortran.so.4  /usr/lib/libgfortran.so.4.0.0
    
    $ pacman -Qo /usr/lib/libgfortran.so  # Find the package that the file belongs to
    /usr/lib/libgfortran.so is owned by gcc-libs 7.3.0+20180125-1
    
  2. Go to our issue tracker for packages in your web browser.

  3. Select the repository that the package belongs to (desktop in this example) in the dropdown menu to the right of the button labelled New issue, and then click the button which should now be labelled New issue in desktop.
    new_issue_in_desktop

  4. Set octave 4.2.1-2 needs to be rebuilt against gcc-libs 7.3.0+20180125-1 as the Title, and copy and paste what was run in Konsole earlier into the Description.

  5. Click the button labelled Submit issue.


As a temporary workaround until the issue is resolved, you can try downgrading the affected package, but keep in mind that partial upgrades are not supported.


(Hans Tovetjärn) #3

This topic was automatically closed after 30 days. New replies are no longer allowed.


How can I downgrade packages?