Which is better, manually create soft link to generic .so or install devel package on Linux

Posted on

Which is better, manually create soft link to generic .so or install devel package on Linux – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, rpm, , , .

I have the libpng rpm package installed on Centos linux which includes:

/usr/lib64/libpng.so.3 #softlink to libpng.so.3.49.0

I use software that uses:


Is it better to install the libpng-devel package which creates the /usr/lib64/libpng.so softlink such that this softlink will get updated when the libpng package gets updated? (I don’t need to actually compile anything so I only need the soft link.)

Or is it better to manually create the softlink knowing that if the libpng package eventually gets updated the softlink won’t work and may need to be recreated?

Or is their another way besides these first two ways that should be used instead?

Solution :

In this case, I would actually choose a third way: Create a lib/ directory somewhere, put the symlink there, and export LD_LIBRARY_PATH pointing to the created directory (preferably modify the start script of the program, or create one if it doesn’t exist). This way, when the program starts, it will look for shared libraries there first, and will find libpng.so. This is a little hack-ish solution, less so if the software you use has a dedicated directory, in which case you can put the symlink where it belongs.

Devel packages tend to install a whole lot of clutter, if you don’t want to actually compile anything, it is needless to install them.

I would recommend installing the libpng-devel package.

  1. you also need the header files!
  2. if you install the library using an rpm; then why not install the .so using an rpm; better keep both up to date with each other.

Leave a Reply

Your email address will not be published.