Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

when I was installing PostgreSQL from source code I had to install the libreadline.so.6 library.
From that moment I can't update my kubuntu system.

The error is:

Setting up ubuntu-keyring (2011.11.21.1) ...

gpggpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP

: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
dpkg: error processing ubuntu-keyring (--configure):
 subprocess installed post-installation script returned error exit status 127

Errors were encountered while processing:
 ubuntu-keyring
 E: Sub-process /usr/bin/dpkg returned an error code (1)'

For this reason I want remove libreadline.so.6

What will happen to my PostgreSQL if I do it? Both of them are important for my project.

Edit

I checked my system and have:

In /usr/local/lib three files:

libreadline.so
libreadline.so.6
libreadline.so.6.2

and in /usr/lib/x86_64-linux-gnu/:

libreadline.so

What are these? Which one of these does PostgreSQL use?

share|improve this question
1  
You can probably fix this by re-ordering your LD_LIBRARY_PATH so that /usr/local/lib/ is at the end, rather than the beginning. Edit your question with the output from: ldd `which gpggpg` –  Phil Dec 28 '12 at 23:12
    
@Phil Thank you for your answer, how can I do the re-ordering? –  DarkCoffee Dec 29 '12 at 8:56

1 Answer 1

up vote 1 down vote accepted

You installed a version of readline different than the one already installed by ubuntu. You may probably safely remove it, since postgresql will get the other one.

BTW, why do you recompiled postgresql on ubuntu? If you don't like to version provided in your ubuntu release, just point your apt to http://pgapt.debian.net/ and get the version you like more.

share|improve this answer
    
thank you for your answer. I'm afraid of recompile postgresql because I'm doing a project on it and I don't want that the situation become worst. So, you are sure that I can delete the libreadline in /usr/local/lib, aren't you? –  DarkCoffee Dec 29 '12 at 20:27
    
Yes, I am quite sure. Moreover the readline is probably only used by psql executable, not by the server itself. Just in case: rename it instead of deleting it. BTW, did you really needed it? I think Debian/Ubuntu postgresql moved from readline to libedit. –  eppesuig Dec 30 '12 at 0:10
    
Thank you. I deleted it and worked! But, when I restarted the system that file was still there! And also when I re-run the upgrade, it give me errors like before. –  DarkCoffee Dec 30 '12 at 5:50
    
I don't know why your library appear once again. Have a look at your init scripts and check who is responsible for that. Anyway, in order to execute apt or any other command ignoring that library, just run it this way: env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libreadline.so apt-get ARGS –  eppesuig Dec 30 '12 at 16:50
    
the command return E: Invalid operation ARGS –  DarkCoffee Dec 30 '12 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.