标头和客户端库次要版本不匹配 [英] Headers and client library minor version mismatch

查看:236
本文介绍了标头和客户端库次要版本不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PHP中,每当尝试(通过mysql_connect)连接到数据库时,都会收到以下警告

In PHP I'm getting the following warning whenever I try to connect to a database (via mysql_connect)

警告:mysql_connect():标头和客户端库次要版本不匹配.标头:50162图书馆:50524

Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50162 Library:50524

在我的php -i输出中,我在mysqli下列出了以下值

In my php -i output I have the following values listed under mysqli

客户端API库版本=> 5.5.24

Client API library version => 5.5.24

客户端API标头版本=> 5.1.62

Client API header version => 5.1.62

我已经尝试更新php5-mysql php,但是我已经拥有了两者的最新版本.我该如何更新标头版本,以便不再看到此警告?

I've tried updating php5-mysql and php but I'm already at the latest version of both of them. How do I go about updating the header version so I stop seeing this warning?

编辑

我的MySQL文件都应更新为最新版本:

My MySQL files should all be updated to be the latest version:

$ apt-get install mysql.*5.5
. . .
mysql-client-5.5 is already the newest version.
mysql-server-core-5.5 is already the newest version.
mysql-server-5.5 is already the newest version.
mysql-testsuite-5.5 is already the newest version.
mysql-source-5.5 is already the newest version.

删除旧版本

$ apt-get remove mysql.*5.1
. . .
Package handlersocket-mysql-5.1 is not installed, so not removed
Package mysql-cluster-client-5.1 is not installed, so not removed
Package mysql-cluster-server-5.1 is not installed, so not removed
Package mysql-client-5.1 is not installed, so not removed
Package mysql-client-core-5.1 is not installed, so not removed
Package mysql-server-5.1 is not installed, so not removed
Package mysql-server-core-5.1 is not installed, so not removed
Package mysql-source-5.1 is not installed, so not removed

推荐答案

您的PHP是使用MySQL 5.1编译的,但现在它链接了5.5.X系列的mysql库. 您必须将PHP升级到使用MySQL 5.5编译的版本,或将mysql客户端库还原为5.1.x.

Your PHP was compiled with MySQL 5.1 but now it is linking a mysql library of 5.5.X family. You have to upgrade PHP to a version compiled with MySQL 5.5 or revert back mysql client libraries to 5.1.x.

这篇关于标头和客户端库次要版本不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆