Installing Optional Libraries
From ReelBox Maniacs
Sometimes it might be necessary to install some optional libraries on your ReelBox. It's quite an easy procedure. Follow the steps described below and your ReelBox will now that there's a new helper available to the system.
[edit] Places for Standard Libraries
The standard libraries are placed in the directorires /lib and /usr/lib on most Unix systems. So this is where the libraries delivered from RMM go. As the root filesystem (where /lib and /usr/lib reside) is a readonly cramfs (compressed ram filesystem, see ReelBox Software Image Layout), you can't put additional libraries there. This is where the /opt directory comes into play.
[edit] A Place for Optional Libraries
Addtional libraries go into /opt/lib. At boot time, the systems looks up this directory and if it exists, all libraries in this directory are added to those the systems knows of. This is done while running one of the boot scripts. ldconfig is fired up and reads its configuration file named /etc/ld.so.conf and creates a library cache file anmed /etc/ld.so.cache. If you look at /etc/ld.so.conf, there's a single line telling the system to look up /opt/lib for libraries.
| File: /etc/ld.so.conf |
|
/opt/lib |
[edit] Installing an Additional Library
So if you want to add a library, put it into /opt/lib, set access rights correctly and reboot - or fire up a ldconfig like shown below. I'm using the IP address which is configured by default on your ReelBox and a library named libnewlib.so.1.2.3 in this example. All you need is a ftp and a telnet client. If you are working with Windows, rcc may be your tool of choice.
| Code: transfering a libraries to the ReelBox |
|
gentoo4reel# cd /where/ever/your/original/lib/is |
Maybe your system complains about the lib directory already existing while trying to mkdir lib (like shown above). That's ok, ignore it. We create it here just make sure it is really there.
| Code: Telnet to your ReelBox aus user root and install a library |
|
192.168.0.175# cd /opt/lib |
When setting the access rights with the help of chmod, make sure you assign rights to the current directory (the single dot) as well as to libnewlib.so.1.2.3.
As you can see from the ls -al command output, ldconfig created some softlinks to libnewlib.so.1.2.3 needed by the system. The library is now known by the Linux system and will be used, if any of the software on your ReelBox tries to call it.
As mentioned above, the ldconfig command is run at boot time automagically. So you don't have to care about anything, when you restart your ReelBox. The library will be available to the system until you delete it.

