Jump to content

Multiple versions of a library [solved]


coccodrilletto
 Share

Recommended Posts

Hi everybody,

is there a way to install multiple versions of the same library?

Thanks!

 

(Details)

I'd like to give a try to an "elder" program, there are both rpm and tar packages for it; both require libncurses.so.4. MDK 10.0 installs the newer libncurses.so.5.

So, the program install fails (failed dependencies if I use rpm; configure error if I build the tar package). If I try to install libncurses.so.4 urpmi/rpm tells me that can't be done for it conflicts with the installed version, which is needed by something else.

Link to comment
Share on other sites

how good are you at compiling a program yourself (from source)?

 

what you could do is install ncruses version 4 doing the:

./configure --prefix=/usr/local
make
su
make install

routine. this will put the new library in /usr/local/lib instead of /usr/lib and then link to it:

ln -s /usr/local/lib/libncurses.so.4 /usr/lib/libncurses.so.4

and it should be detected by the program (we hope). the reason for configuring the older version to put itself in /usr/local is so that it doesn't overwrite any files and cause problems with anything using the newer ncurses.

Edited by tymark
Link to comment
Share on other sites

Thanks Tymark,

I would have gone for the solution you proposed; only, I wasn't immediately able to find sources for libncurses.4 around... in the meanwhile, a friend suggested me to try a (dirty enough) workaround which, much to my surprise, turned out to work.

I created a soft link from the existing libncurses.so.5 to the (missing) libncurses.so.4, and then installed the rpm with --nodeps. The program is happy with the libncurses I gave it, it doesn't seem to notice any difference.

 

The program is e2defrag, which I wanted to test. Unluckily, it defrags only ext2 formatted with 1 kB blocks, while the default is 4 kB blocks. So it's useless. But I managed to test it on an image file which I formatted with

mke2fs -b 1024 image

then mounted loopback, then intentionally fragmented by copying and deleting many files, then umounted, and e2defrag defragged it happily :-)

Thanks again, Cocco

Edited by coccodrilletto
Link to comment
Share on other sites

I created a soft link from the existing libncurses.so.5 to the (missing) libncurses.so.4, and then installed the rpm with --nodeps. The program is happy with the libncurses I gave it, it doesn't seem to notice any difference.

ah yes, i've done similar before. should've though of it! :oops:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...