Linux - 未找到依赖项 libmysqlclient.so.15

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8889603/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 04:06:26  来源:igfitidea点击:

Linux - Dependency libmysqlclient.so.15 not found

linuxdependenciescentosrpmlibmysql

提问by

I start the instalation, now i receive a error for file dependencies

我开始安装,现在我收到文件依赖错误

see:

看:

root@ca [~/sitebuilder]# rpm -Uhv updates/*.rpm
error: Failed dependencies:
libmysqlclient.so.15()(64bit) is needed by php5sb-5.2.1-10swsoft.x86_64
libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by php5sb-5.2.1-10swsoft.x86_64

How to install a libmysqlclient.so.15 dependence on centos?

如何在centos上安装一个libmysqlclient.so.15依赖?

Thanks.

谢谢。

回答by lai

I have encountered this problem before.

我以前遇到过这个问题。

I checked libmysqlclient.so version, it's libmysqlclient.so.16 but not libmysqlclient.so.15.

我检查了 libmysqlclient.so 版本,它是 libmysqlclient.so.16 但不是 libmysqlclient.so.15。

so I used MySQL-shared-compat rpm package to solve this.

所以我使用 MySQL-shared-compat rpm 包来解决这个问题。

run:

跑:

#rpm -qp --provides MySQL-shared-compat-5.1.47-1.rhel5.x86_64.rpm
MySQL-shared 
libmysqlclient.so.12()(64bit) 
libmysqlclient.so.14()(64bit) 
libmysqlclient.so.14(libmysqlclient_14)(64bit) 
libmysqlclient.so.15()(64bit) 
libmysqlclient.so.15(libmysqlclient_15)(64bit) 
libmysqlclient.so.16()(64bit) 
libmysqlclient.so.16(libmysqlclient_16)(64bit) 
libmysqlclient_r.so.12()(64bit) 
libmysqlclient_r.so.14()(64bit) 
libmysqlclient_r.so.14(libmysqlclient_14)(64bit) 
libmysqlclient_r.so.15()(64bit) 
libmysqlclient_r.so.15(libmysqlclient_15)(64bit) 
libmysqlclient_r.so.16()(64bit) 
libmysqlclient_r.so.16(libmysqlclient_16)(64bit) 
MySQL-shared-compat = 5.1.47-1.rhel5

回答by kenorb

You can try to find the right package by the following command:

您可以尝试通过以下命令找到正确的包:

$ sudo yum whatprovides libmysqlclient.so.15
libmysqlclient15-5.0.95-5.w5.i386
libmysqlclient15-devel-5.0.95-5.w5.i386
cpanel-mysql-libs-5.0.96-1.cp1136.i386 : The shared libraries required for MySQL clients

then:

然后:

$ sudo yum reinstall WHATEVER_THE_PACKAGE_NAME_IS

You may double check the package name by doing yum search package_name.

您可以通过执行yum search package_name.

If not found, you may try to fix your yum repositories e.g. by configuring Webtatic YumRepository.

如果没有找到,您可以尝试修复您的 yum 存储库,例如通过配置Webtatic Yum存储库。

To set up the repository, install the webtatic-release RPM:

要设置存储库,请安装 webtatic-release RPM:

Webtatic EL6 for CentOS/RHEL 6:

用于 CentOS/RHEL 6 的 Webtatic EL6:

rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

Webtatic EL5.1 for CentOS/RHEL 5:

用于 CentOS/RHEL 5 的 Webtatic EL5.1:

rpm -Uvh http://repo.webtatic.com/yum/el5/latest.rpm

Webtatic 5 for CentOS/RHEL 5:

用于 CentOS/RHEL 5 的 Webtatic 5:

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

and repeat the search/reinstall process again.

并再次重复搜索/重新安装过程。



If you're running cPanel, you may try to run the following script:

如果您正在运行cPanel,您可以尝试运行以下脚本:

/scripts/check_cpanel_rpms --fix

If won't help, remove the broken package e.g. rpm -e cpanel-mysql-5.0.96-1.cp1136and run the check command again.

如果没有帮助,请删除损坏的包,例如rpm -e cpanel-mysql-5.0.96-1.cp1136并再次运行检查命令。

If still doesn't work, another thing could be to recompile your Apache (only if your LAMP is broken) by:

如果仍然不起作用,另一件事可能是通过以下方式重新编译您的 Apache(仅当您的 LAMP 损坏时):

/scripts/easyapache


Related

有关的

CentOS

CentOS

Ubuntu

Ubuntu

回答by Ni Xiaoni

Like the answer of @lai

就像@lai 的回答一样

I install the MySQL-shared-compat-5.1.47-1.rhel5.x86_64.rpm. But it didn't work.

我安装了 MySQL-shared-compat-5.1.47-1.rhel5.x86_64.rpm。但它没有用。

And then I install the MySQL-shared-5.1.47-1.rhel5.x86_64.rpm. It worked!

然后我安装MySQL-shared-5.1.47-1.rhel5.x86_64.rpm。有效!

I hope this can help you. Good luck :)

我希望这可以帮助你。祝你好运 :)