Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [libraries]

A library is a collection of functionality that programs can use. They can be dynamically loaded by a program, or they may be compiled into the program.

57
votes
2answers
15k views

Why are shared libraries executable?

Why have almost all the shared libraries in /usr/lib/ have the executable permission bit set? I don't see any use case for executing them. Some do manage to hook-up some form of main function to print ...
56
votes
2answers
112k views

Use shared libraries in /usr/local/lib

I have build some libraries from sources, and the files after make install are in /usr/local/lib For example, in my case I have the file libodb-2.2.so which is in this directory. However when I ...
55
votes
2answers
61k views

What is the difference between .a and .so file?

As far as I understand they are libraries, but what is the difference between the two?
50
votes
7answers
115k views

How to find out the dynamic libraries executables loads when run?

I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?
39
votes
1answer
31k views

Difference between lib, lib32, lib64, libx32, and libexec

My 64 bit Ubuntu 13.04 system has the following directories in /: lib lib32 lib64 libx32 libexec In the /usr directory there is: lib lib32 libx32 libexec This seemed like something that could be ...
37
votes
1answer
24k views

Loading of shared libraries and RAM usage

I'm wondering about the way Linux manages shared libraries. (actually I'm talking about Maemo Fremantle, a Debian-based distro released in 2009 running on 256MB RAM). Let's assume we have two ...
31
votes
4answers
123k views

Viewing Linux Library / Executable version info

In Windows, EXE and DLL have version info, including at least the following fields: file version product version internal name product name copyright In Linux Library / Executable: Which fields ...
25
votes
4answers
3k views

How to execute library commands from the shell?

I wanted to simply calculate the length of a string (that is hash value). So, I opened terminal and did this: $ apropos length that returned me with a bunch of commands/functions having (3) or (3ssl)...
25
votes
2answers
46k views

Changing linked library for a given executable (CentOs 6)

I have an executable linked like this: $ ldd a.out libboost_system-mt.so.1.47.0 => /usr/lib64/libboost_system-mt.so.1.47.0 (0x00007f4881f56000) libssl.so.10 => /usr/lib64/...
23
votes
1answer
22k views

What does libgcc_s.so contain?

I tried running objdump on the lib to figure it out without success. Is there a way to find out what a library does?
17
votes
5answers
51k views

ldd tells me my app is “not a dynamic executable”

I have a 32-bit application (called uclsyn) I received from an astronomy professor. I managed to get it running on CentOS a year ago, but now when I am setting up a new CentOS VM, it won't run and I ...
14
votes
3answers
104k views

gcc can't link to pthread?

I have recently installed XUbuntu 11.10 64bit, but I am having problem compiling the most simple pthread example. Here is the code pthread_simple.c: #include <stdio.h> #include <pthread.h&...
14
votes
2answers
1k views

How do I trace library loading?

I have program that depends on library that is linked to libboost 1.67, which installed in the system. When I launch it, I have an error that libboost_system.so.1.58 does not exist. LD_PRELOAD and ...
14
votes
2answers
7k views

strace for library calls

I know of strace, which is super handy for watching system calls. Is there an equivalent that can trace calls to external libraries? For example, I'm trying to debug some SSLeay misbehavior with a ...
13
votes
2answers
5k views

Using Atlas from scipy

I installed Ubuntu 12.04 64 bit. I need to work with python and scipy, I installed them and when I run the test: python -c "import scipy; scipy.test()" I get the message: ImportError: libatlas.so....
13
votes
1answer
17k views

Where did /usr/lib64 go and what is /usr/lib/x86_64-linux-gnu?

I have two Ubuntu-x86_64 systems. One is version 10.04, the other 12.04 and there is a difference in the structure of the lib directories. This doesn't surprise me, but I'm curious if anyone knows ...
13
votes
1answer
3k views

Is there an easy method for installing binary builds of glibc?

Time and time again I see questions such as these: GLIBCXX 3.4.15 on Centos 6 CentOS 4.8 and glibc 2.5 And these are the types of solutions we're typically pushing: how to run new software without ...
12
votes
2answers
33k views

How to export LD_LIBRARY_PATH to all users and system services

I want to export LD_LIBRARY_PATH to system services and all users. System services are run before login, so .bashrc is not applicable. How to achieve this?
12
votes
1answer
8k views

How does gcc know where boost is installed

I installed boost using sudo apt-get install on Ubuntu. Later I did not have to give gcc the I flag alongwith the path to the boost libraries to use boost ! Nor did I do any pkg-config --cflags --libs ...
11
votes
6answers
18k views

What is the difference between a Library call and a System call in Linux?

I would like to know what is the difference between a Library call and a System call in Linux. Any pointers for a good understanding of the concepts behind both will be greatly appreciated.
11
votes
1answer
12k views

How to convince dpkg that libssl1.0.2 is >= libssl1.0.0?

I am trying to install a 3rd party .deb package that I have installed before on Debian 8. But I cannot install on a fresh Debian 9 setup because I get the following error: dpkg: dependency problems ...
10
votes
4answers
20k views

Difference between system calls and library functions

I have been through the answer of this question but do not quite understand the difference between system calls and library functions. Conceptually, what is the difference between the two?
10
votes
4answers
13k views

Stereo “tone-generator” for linux?

Is there something like a stereo (separate left-and right-channel) tone-generator for Linux? Where you can set volume and tone/pitch for each channel, and preferably also set the wave-form (sine, ...
10
votes
3answers
45k views

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/...
10
votes
3answers
5k views

Is there a way to determine what packages or libraries should be loaded to support an executable?

There is an executable I want to install on a computer that I can't recompile that wasn't built as a package, and I want to download the libraries it requires to run them. Below is part of the output ...
10
votes
1answer
3k views

Portability of an executable to another Linux machine

I've installed the program Motion on one Linux machine (M1) and want the same program on another (M2). There are various builds of this program, and I have forgotten which one I have used, so can I ...
10
votes
1answer
8k views

How do I maintain a separate (newer) glibc / gcc / … stack as non-root on Linux

Our computation cluster runs a very old version of CentOS, with an old Kernel (2.6.18) and, of course, old libs and binaries. Because updating the whole thing requires a lot of work on all the nodes, ...
10
votes
2answers
1k views

ELF shared libraries - motivation for the PLT

Could self-modifying code be used to speed up function calling in dynamically linked libraries? As far as I understand it, ELF shared libraries use a kind of indirect jump table (the procedure ...
9
votes
3answers
5k views

How to find a Fedora package providing a dependency I need?

I sometimes install software which isn't present in the repositories, and then I run into the problem of not satisfied dependencies. The error usually tells me which library or command is missing. ...
8
votes
4answers
10k views

Install development files locally to build on system without root access?

There is a server that I do work on, running an older version of Linux. I don't have root access to the system, so I wanted to build a more recent version of a tool that I use a lot (Vim 7.3). I ...
8
votes
2answers
3k views

Identifying running programs that are using the old version of a library I just replaced

After installing updates to address CVE-2014-0160 (the OpenSSL Heartbleed bug), I had to take care to restart anything that might be using libssl -- many services, such as Apache and my VPN software, ...
8
votes
1answer
15k views

What is /lib64/ld-linux-x86-64.so.2 and why can it be used to execute file?

Recently, I have learned a trick that if a file lacks executable permissions, we can run that file by using /lib64/ld-linux-x86-64.so.2. For example, to restore x permission for -rw-r--r-- 1 root ...
8
votes
1answer
891 views

Finding the library versions a library was linked against

I have a library that was compiled on an unknown Ubuntu machine, And I'd like to determine what version of Ubuntu that machine had at the compile time. My idea was to try and find the versions of ...
7
votes
1answer
18k views

What is the default value of LD_LIBRARY_PATH? [duplicate]

In my case, it seems as if LD_LIBRARY_PATH is set to the empty string. But all standard system tools still work fine, so I guess the dynamic linker checks for that case and uses some default for ...
7
votes
2answers
21k views

/usr/bin/ld: cannot find -lfl

After running the following command: g++ lex.yy.c -lfl I get the following error: /usr/bin/ld: cannot find -lfl How can I solve it?
7
votes
1answer
61k views

libcrypto.so.10: cannot open shared object file: No such file or directory [closed]

I am trying to install ODBC driver for Debian according to those instructions: https://blog.afoolishmanifesto.com/posts/install-and-configure-the-ms-odbc-driver-on-debian/ However, when I type ...
7
votes
1answer
764 views

What files should I copy from Windows into Wine?

As far as I understand Wine runtime does better if some libraries are copied from MS Windows, but some Windows system libraries really are not to be used with Wine (some can even make it stop working, ...
6
votes
2answers
10k views

Why does LD keep outputting “no version information available”

On every loading of a lib, I get the error: no version information available This lib has been compiled on another PC (ubuntu 10.04) than the one running it (mandriva 2010.2). $ ldd /usr/local/...
6
votes
4answers
9k views

Linux From Scratch: libgmp.la, libmpfr.la, and libmpc.la not found during version-check

I'm trying to build a Linux From Scratch system on my host Linux Mint machine. However, when I run the version-check.sh file, it returns that my system is missing libgmp.la, libmpfr.la, and libmpc.la, ...
6
votes
1answer
7k views

Running a statically linked binary with a different glibc

I have a statically linked binary for a tool that I'm trying to run on RHLE4. The tool complains about glibc. It needs 2.4 and the one in the system is 2.3. Here is the message that it spits out: ./...
6
votes
2answers
2k views

added new library, old one hanging around

In ubuntu 12.04, I downloaded the source for a geospatial library, gdal-1.11.0, into ~/src, configured it and compiled it successfully, it seemed. New files such as libgdal.a got put into /usr/local/...
6
votes
1answer
7k views

Finding function parameters for functions in shared object libraries

I am currently fiddling around with some c libraries without documentation. I am wondering if it is at all possible to retrieve more metadata, such as parameters and return values, outside of what is ...
6
votes
4answers
47k views

startx error when setting up X server on archlinux

I am trying to install X on my archlinux home desktop. I get this error when trying to start it (startx/xinit): [root@computer ~]# startx xauth: file /root/.Xauthority does not exist xauth: file /...
6
votes
1answer
7k views

What's the difference between a binary file and a library?

I'm trying to understand the Filesystem Hierarchy Standard. I have looked up both binaries and libraries, and as I currently understand it: binaries are files of computer-readable code in binary ...
6
votes
1answer
17k views

How do I get a list of shared library filenames under Linux?

Is there a GNU Linux built-in for getting a list of the filenames of shared libraries? I have considered parsing the output of ldconfig -p. However, I'm not sure about consistency in output from ...
6
votes
2answers
52k views

Error Loading Shared Libraries when Installing Redhat Directory Server

While Installing the Red Hat Directory Server on the Red Hat Linux Server 5 (x86_64)i am getting the following error bin/slapd/server/dsktune: error while loading shared libraries: libstdc++.so.5: ...
6
votes
2answers
4k views

libssl and libcrypto backward compatible?

I have an old server application that requires libssl.so.0.9.6 and libcrypto.so.0.9.6. My issue is I currently have libssl.so.1.0.0a and libcrypto.so.1.0.0a on my system. I tried symlinking to the ...
6
votes
1answer
431 views

Why should or should not shared libraries be executable (e.g. Red Hat vs Debian)?

This is almost but not quite a duplicate of "Why are .so files executable?". I note that on Red Hat based systems shared libraries have execute permission but on Debian they do not. Logically shard ...
6
votes
1answer
3k views

shared library not found even with ld.so.conf updated

$ sudo ldconfig -v|grep libOpenNI 355: libOpenNI2.so -> libOpenNI2.so but when I am executing the program I'm getting ./SimpleRead: error while loading shared libraries: libOpenNI2.so: cannot ...
6
votes
1answer
413 views

Executing a shared library

Some shared libraries provide an output when called from the command line as if they were executables. For example: $ /lib/libc.so.6 GNU C Library stable release version 2.13, by Roland McGrath et ...