• mysql: error while loading shared libraries: libmysqlclient.so.16


    [root@host_41 mysql]# mysql
    mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

    被同事错删除了mysql,搞了一晚上,凡是中文博客的解决方案全部都是shit!!!凡是中文问答网站的解决方案,全部都是装逼。

    最后:

    http://ntcn.net/blog/?p=6575

    找到方法:

    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 rpmyum 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

    我只想说,傻逼们。。看看牛逼是怎么解决问题的。就2个命令。

  • 相关阅读:
    UIScrollerView遇到UINavigationController
    iOS 自动化打包
    最最基本的SQL常用命令
    导入样式表与外部样式表的区别
    jdk、jre、JVM的简单区别与联系
    JDBC驱动的四种类型
    将映射中的值进行排序并输出键
    Java优先级队列
    Java线程池
    Callable--创建有返回值的线程
  • 原文地址:https://www.cnblogs.com/zc22/p/3197038.html
Copyright © 2020-2023  润新知