Chinaunix首页 | 论坛 | 博客
  • 博客访问: 637277
  • 博文数量: 110
  • 博客积分: 2352
  • 博客等级: 大尉
  • 技术积分: 1253
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-29 14:00
文章分类
文章存档

2018年(1)

2013年(20)

2012年(89)

分类: Mysql/postgreSQL

2013-07-31 15:27:11

场景:服务器上删除mysql5.1.59版本后,安装新版本mysql 5.5 24,在初始化完成后,登录数据库时遇到如下问题:
mysql: error while loading shared libraries: libtinfo.so.5:cannot open shared object file: No such file or directory 

解决方法:
(1)先在/usr/lib64目录下查找文件,
lrwxrwxrwx. 1 root root 25 1月  11 2013 libtinfo.so -> ../../lib64/libtinfo.so.5
发现此文件不存在,
(2)直接从其他服务器上拷贝,(然后直接做软连接,此步可选择),并修改权限,即可!
scp libtinfo.so.5  root@192.168.0.X:/usr/lib64
chmod 777 libtinfo.so.5



具体方法参考如下:
ERROR:
mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory 

1. checking for libmysqlclient installed.

[root@node01 mysqli]# ldconfig -v | grep mysql /usr/lib64/mysql:
libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0 [root@node01 mysqli]#
[root@node01 mysqli]# locate libmysqlclient.so /usr/lib64/mysql/libmysqlclient.so /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16.0.0 [root@node01 mysqli]# if output empty then simply run these commands on rpm\yum based linux:

yum install mysql-devel mysql-libs 
2. re-compile php-mysql module with path to lib64 folder.

./configure –with-php-config=/usr/local/php/bin/php-config –with-mysql=/usr/bin/ –with-libdir=lib64 
3. alternative solution is:

[root@node01 mysql]# ln -s /usr/lib64/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so

阅读(5788) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~