Friday, May 16, 2014


Today when I execute mysql -uroot -p command in ubuntu console I get this error message.

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

Problem started when I updated my current readline library to 6.3 version. So here is the quick fixes for this problem.

1. First of all login as "root" user. Following command will help you to do this.
user@localhost:~$ sudo su

2. Go to folder /usr/local/lib and check libreadline exist or not.
root@localhost:/home/user# cd /usr/local/lib
root@localhost:/usr/local/lib# ls -la libreadline*

Output:

-rw-r--r--  1 root root  1427712 May 11 18:03 libreadline.a
-rw-r--r--  1 root root  1427712 May 11 18:02 libreadline.old
lrwxrwxrwx  1 root root       16 May 11 18:03 libreadline.so -> libreadline.so.6*
lrwxrwxrwx  1 root root       22 May 11 18:13 libreadline.so.6 -> libreadline.so.6.3.old*
-r-xr-xr-x  1 root root   829465 May 11 18:03 libreadline.so.6.3*
-r-xr-xr-x  1 root root   829465 May 11 18:02 libreadline.so.6.3.old*

3. Now create a temporary folder and create a backup of these libraries. Actually we are going to remove these libraries, and in case of emergency you know what to do.

root@localhost:/usr/local/lib# mkdir /tmp/libreadline_bk
root@localhost:/usr/local/lib# mv libreadline.* /tmp/libreadline_bk/.

4. Now type `ldconfig` in console. According to man page of ldconfig:

ldconfig  creates  the  necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib).

root@localhost:/usr/local/lib# ldconfig

5.  Now type apt-get update. It take some times and you need Internet connectivity to complete this step
root@localhost:/usr/local/lib#apt-get update

 After this update the problem should solved.

0 comments:

Post a Comment

Categories

.
Powered by Blogger.

Popular Posts

Like Us