今天使用sudo apt-get 安装包的时候,出现gpg错误,如下:
gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
google了一下,看到:
////////////////////////////////////////////////////////////////////////////
I fought this problem from synaptic on down to gpg, only to find it was readline all along. My solution was somewhat simpler than building or patching.
in terminal:
ls /usr/local/lib
there was a bunch of readline libs in there (libreadline.so.BLAH-BLAH) so i:
su
mkdir temp
mv /usr/local/lib/libreadline* temp
ldconfig
apt-get update
and voila. went without a hitch. then i deleted my temporary directory (rm -rf /usr/local/lib/temp), exited su.
~2 hours fighting to no avail, and for it work with a few seconds of commands...
I'm not complaining, but it does seem somewhat of a cruel irony.
///////////////////////////////////////////////////////////////////////////////////
根据上面的网友回答,问题解决了,apt-get 能够正常工作,看来是因为存在多个版本的libreadline.so导致,但是不知道这个libreadline.so在什么时候出现的,头疼。