To determine what shared objects a program is linked to, use the ldd command. For example, running this command:
ldd /usr/bin/curl
gives the following output on my Ubuntu 9.10 box:
linux-vdso.so.1 => (0x00007fffb6b78000) libcurl.so.4 => /usr/lib/libcurl.so.4 (0x00007f9226904000) libz.so.1 => /lib/libz.so.1 (0x00007f92266ed000) libc.so.6 => /lib/libc.so.6 (0x00007f922637e000) librt.so.1 => /lib/librt.so.1 (0x00007f9226176000) libidn.so.11 => /usr/lib/libidn.so.11 (0x00007f9225f43000) liblber-2.4.so.2 => /usr/lib/liblber-2.4.so.2 (0x00007f9225d35000) libldap_r-2.4.so.2 => /usr/lib/libldap_r-2.4.so.2 (0x00007f9225aec000) libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f92258be000) libssl.so.0.9.8 => /lib/libssl.so.0.9.8 (0x00007f9225670000) libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007f92252e9000) /lib64/ld-linux-x86-64.so.2 (0x00007f9226b4b000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f92250cd000) libresolv.so.2 => /lib/libresolv.so.2 (0x00007f9224eb4000) libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00007f9224c9a000) libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007f92249f8000) libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f9224740000) libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f9224515000) libcom_err.so.2 => /lib/libcom_err.so.2 (0x00007f9224311000) libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f9224109000) libdl.so.2 => /lib/libdl.so.2 (0x00007f9223f05000) libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00007f9223d02000) libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007f9223af1000) libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007f9223879000) libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007f9223675000)
The items left of the arrows are the libraries expected by the program. The items right of the arrows are the absolute paths of the libraries found by searching the directories listed in the LD_LIBRARY_PATH variable and the directories listed in /etc/ld.so.conf.
Enabling The Multiverse Repository On Ubuntu
If you need to install the Sun JDK or some other non-free software on Ubuntu, you’ll likely need to enable the multiverse repository. To do this from the command line, you’ll need to modify the file /etc/apt/sources.list.
The file /etc/apt/sources.list looks like this:
To enable the multiverse repository, add the word multiverse after each occurrence of the word universe. The file should then look like this:
After running the command apt-get update, you should be able to install packages within the multiverse repository.