Questions tagged [shared-library]

312 questions
74
votes
2 answers

Why and how are some shared libraries runnable, as though they are executables?

On 32-bit Linux systems, invoking this $ /lib/libc.so.6 and on 64-bit systems this $ /lib/x86_64-linux-gnu/libc.so.6 in a shell, provides an output like this: GNU C Library stable release version 2.10.1, by Roland McGrath et al. Copyright (C) 2009…
Ho1
  • 2,552
  • 3
  • 20
  • 25
51
votes
6 answers

What C library version does my system use?

How can I tell for sure what userland C library my system uses? Possible reasons to need this information include: There's a gigantic source package I am considering downloading which I'm sure will do proper checks and lists a mininum library…
goldilocks
  • 86,451
  • 30
  • 200
  • 258
43
votes
3 answers

Why nm shows no symbols for /lib/i386-linux-gnu/libc.so.6?

I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.
masec
  • 615
  • 1
  • 7
  • 12
43
votes
4 answers

How to check if a shared library is installed?

My question originates from my problem in getting ffmpeg started. I have installed ffmpeg and it is displayed as installed: whereis ffmpeg ffmpeg: /usr/bin/ffmpeg /usr/bin/X11/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz Later, I…
Abdul Al Hazred
  • 25,760
  • 23
  • 64
  • 88
32
votes
5 answers

What system call is used to load libraries in Linux?

In strace outputs, the paths to the libraries that executables call are in calls to open(). Is this the system call used by executables that are dynamically linked? What about dlopen()? open() isn't a call I'd have guessed would play a role in the…
Melab
  • 3,808
  • 8
  • 29
  • 49
19
votes
2 answers

How do I find out the version number of an installed library?

Question relevant to RedHat/CentOS. I'm a little confused between package and library and how to pin them to a fixed version. There's an X11 rollover bug in recent libxcb versions that affects my C programs. libxcb-1.5-1 doesn't have that bug. So I…
dargaud
  • 557
  • 1
  • 4
  • 18
17
votes
1 answer

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

I have a binary executable named "alpha" that requires a linked library (libz.so.1.2.7) which is placed at /home/username/myproduct/lib/libz.so.1.2.7 I export the same to my terminal instance before spawning my binary executable by executing the…
daedalus_hamlet
  • 331
  • 1
  • 9
17
votes
2 answers

Relationship between ldconfig and ld.so.cache

After I restart my computer, ld.so.cache still has the information in it, so my questions are as follows: Is the information always kept there? Isn't it being removed after restart or something like that? Like RAM or browser cache being…
Nirel
  • 171
  • 1
  • 1
  • 3
16
votes
2 answers

How can the dynamic linker/loader itself be dynamically linked as reported by `file`?

Consider the shared object dependencies of /bin/bash, which includes /lib64/ld-linux-x86-64.so.2 (dynamic linker/loader): ldd /bin/bash linux-vdso.so.1 (0x00007fffd0887000) libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6…
Shuzheng
  • 4,023
  • 1
  • 31
  • 71
15
votes
1 answer

Is the vdso shared library (linux-vdso.so) the library that contains the kernel object code (system calls)?

I noticed that all my programs compiled to gcc are linked to vdso library. Is this the library that contain the system calls to the kernel, like mmap() and fork() and other system calls? I know that system calls are not functions of the GNU C…
15
votes
2 answers

Why can't I install multiple versions of a shared library?

There are often instances where a certain program will depend on library version x.y and another on x.z but, as far as I'm aware, no package manager will allow me to install both x.y and x.z. Sometimes they will allow both major versions (such as…
Tyler
  • 368
  • 1
  • 2
  • 8
15
votes
3 answers

LD_LIBRARY_PATH always blank after sudo

I get shared library errors whenever I seem to install software manually. Upon executing echo $LD_LIBRARY_PATH it shows up as.. nothing. I've tried adding /usr/local/lib to a .conf file in /etc/ld.so.conf.d but it seems like it never executes. This…
Dissident Rage
  • 363
  • 2
  • 3
  • 10
13
votes
2 answers

ldd shows no location after arrow; library does not exist on system

I want to create a chroot environment that has access to hand-picked programs but is completely isolated from the rest of the system. I created three folders in this chroot folder: bin, lib, lib64. I then copied an executable, in this case /bin/bash…
Post Self
  • 251
  • 1
  • 2
  • 10
13
votes
2 answers

How to change the path of shared libraries shown by ldd?

I am trying to make the postgis extension work on my system and it always spits out "$libdir/postgis2.2" no such file or directory error. For my curiosity I executed "ldd postgis-2.2.so" and it spits out the following result : linux-vdso.so.1 =>…
AnkitSablok
  • 303
  • 1
  • 2
  • 7
10
votes
1 answer

What do the multiple GLIBC versions mean in the output of ldd?

The ldd program reports some missing shared libraries that my shared library needs. (I built it on a different machine with Red Hat Linux 7 and want to run it on another with Red Hat Linux 6.) In the "version information" section below, there are…
Tones
  • 101
  • 1
  • 1
  • 3
1
2 3
20 21