我们从源代码构建自己的PHP和
mysql软件包,这个软件包用于PHP-5.4.10版本,并在我们自己的存储库中托管这些软件包.我们称这个包为custom-PHP和custom-MysqL(-libs& -server)
原文链接:https://www.f2er.com/javaschema/281749.html当我在服务器上安装yum install custom-PHP时,yum会列出一个依赖项问题:
--> Finished Dependency Resolution Error: Package: custom-PHP-1.1.x86_64 (PHP) Requires: libMysqLclient.so.18(libMysqLclient_16)(64bit) Error: Package: custom-PHP-1.1.x86_64 (PHP) Requires: libMysqLclient.so.18(libMysqLclient_18)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest
libMysqLclient.so.18文件由custom-MysqL-libs提供,它位于custom-PHP的spec文件中的Requires下.即使我在发出yum install custom-PHP之前手动安装了custom-MysqL-libs,我仍然会得到上面的错误.
我们的custom-MysqL-libs是从MysqL源代码构建的,并提供了libMysqLclient.so:
$rpm -qlp custom-MysqL-libs-1.0.x86_64.rpm /custom/lib64/libMysqLclient.so /custom/lib64/libMysqLclient.so.18 /custom/lib64/libMysqLclient.so.18.0.0 .... $
当我们在不同的地方安装库时,custom-MysqL-libs会在完成后使用/etc/ld.so.conf.d/文件中指定的路径发出ldconfig.我用ldconfig -v验证了这些库是可见的
# ldconfig -v ... /custom/lib64: libMysqLclient.so.18 -> libMysqLclient.so.18.0.0 ... #
Yum还找到了库和包:
# yum whatprovides */libMysqLclient.so.18 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile custom-MysqL-libs-1.0.x86_64 : Custom MysqL libraries Repo : custom Matched from: Filename : /custom/lib64/libMysqLclient.so.18 custom-MysqL-libs-1.0.x86_64 : Custom MysqL libraries Repo : installed Matched from: Filename : /custom/lib64/libMysqLclient.so.18
任何帮助表示赞赏.
谢谢 !