visual-studio-code - error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory - TagMerge
3error while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directoryerror while loading shared libraries: libxshmfence.so.1: cannot open shared object file: No such file or directory

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

Asked 1 years ago
1
3 answers

I added the following libraries and seemed to spring to life somewhat

sudo apt install libxshmfence1 libglu1

Source: link

0

For example, I was trying to use FreeRADIUS server and it showed me this error:
radiusd: error while loading shared libraries:libfreeradius-radius-2.1.10.so:cannot open shared object file: No such file or directory
All you need to do is to open terminal (Ctrl+Alt+T) and type the following command:
sudo /sbin/ldconfig -v
Let me show it to you by an example. Let’s say you see this error:
error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory
Now, apt provides the search option that can be used for searching a package and knowing its version before installing it.
[email protected]:~$ apt search libgobject
Sorting... Done
Full Text Search... Done
librust-gobject-sys-dev/focal 0.9.0-2 amd64
  FFI bindings to libgobject-2.0 - Rust source code
It would be a good idea to search for the string in the names of the package (instead of description) to get more concise results.
[email protected]:~$ apt search --names-only gobject
Sorting... Done
Full Text Search... Done
gobject-introspection/focal-updates 1.64.1-1~ubuntu20.04.1 amd64
  Generate interface introspection data for GObject libraries

libavahi-gobject-dev/focal 0.7-4ubuntu7 amd64
  Development headers for the Avahi GObject library

libavahi-gobject0/focal 0.7-4ubuntu7 amd64
  Avahi GObject library

libcairo-gobject-perl/focal,now 1.005-2 amd64 [installed,automatic]
  integrate Cairo into the Glib type system in Perl

libcairo-gobject2/focal,now 1.16.0-4ubuntu1 amd64 [installed,automatic]
  Cairo 2D vector graphics library (GObject library)

libghc-gi-gobject-dev/focal 2.0.19-1build1 amd64
  GObject bindings

libghc-gi-gobject-doc/focal,focal 2.0.19-1build1 all
  GObject bindings; documentation

Source: link

0

In the “I wish the Internet had an actual correct answer” category comes a question from a Windows colleague trying to build software on Linux. He asks “I’m trying to do some web performance testing and I compiled weighttp and the libev libraries, which worked fine, but when I try to run the program it gives me the following error.”
weighttp: error while loading shared libraries: libev.so.4: cannot open shared object file: No such file or directory
Ah yes, a classic problem when building software. The problem here is that libev installed itself into /usr/local/lib:
$ ls -l /usr/local/lib/libev*
-rw-r--r--. 1 root root 435770 Feb 22 15:20 /usr/local/lib/libev.a
-rwxr-xr-x. 1 root root 926 Feb 22 15:20 /usr/local/lib/libev.la
lrwxrwxrwx. 1 root root 14 Feb 22 15:20 /usr/local/lib/libev.so -> libev.so.4.0.0
lrwxrwxrwx. 1 root root 14 Feb 22 15:20 /usr/local/lib/libev.so.4 -> libev.so.4.0.0
-rwxr-xr-x. 1 root root 174059 Feb 22 15:20 /usr/local/lib/libev.so.4.0.0
You can see what libraries a program is dynamically linked to with the ‘ldd’ command:
$ ldd /usr/local/bin/weighttp
        linux-vdso.so.1 =>  (0x00007fff251ff000)
        libev.so.4 => not found
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f8f1cc1e000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f8f1c88b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8f1ce49000)
When you’re building open-source software under a UNIX OS you often use the “configure” command. You can change where the software installs by using the “prefix” flag:
$ ./configure –prefix=/usr
2. Make a symbolic link from /lib to the files in /usr/local/lib. This is less intrusive than installing everything to /usr, but still a bad idea, for most of the same reasons as #1. If you’re the kind of person that likes to smoke while refueling vehicles go ahead and try:
$ sudo ln -s /usr/local/lib/libev.so.4 /usr/lib/libev.so.4
$ sudo ldconfig

Source: link

Recent Questions on visual-studio-code

    Programming Languages