我正在尝试在 Ubuntu 14.04.2 LTS 上构建 php5 依赖项。不幸的是,我收到以下错误消息。
% sudo apt-get build-dep php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have unmet dependencies:
apache2-dev : Depends: libaprutil1-dev but it is not going to be installed
mysql-server : Depends: mysql-server-5.5 but it is not going to be installed
E: Build-dependencies for php5 could not be satisfied.
使用问题解决程序后,我发现 apt-get 正在尝试找到安装 mariadb 包而不是 mysql 包的方法。
% sudo apt-get -o Debug::pkgProblemResolver=yes build-dep php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting pkgProblemResolver with broken count: 5
Starting 2 pkgProblemResolver with broken count: 5
Investigating (0) mariadb-client-5.5 [ amd64 ] < 5.5.44-1ubuntu0.14.04.1 > ( universe/database )
Broken mariadb-client-5.5:amd64 Conflicts on mysql-client-core-5.5 [ amd64 ] < none -> 5.5.44-0ubuntu0.14.04.1 > ( database )
Considering mysql-client-core-5.5:amd64 -2 as a solution to mariadb-client-5.5:amd64 0
Added mysql-client-core-5.5:amd64 to the remove list
Conflicts//Breaks against version 5.5.35+dfsg-1ubuntu1 for mysql-client-core-5.5 but that is not InstVer, ignoring
Broken mariadb-client-5.5:amd64 Breaks on mysql-client [ amd64 ] < none -> 5.5.44-0ubuntu0.14.04.1 > ( database )
Conflicts//Breaks against version 5.5.44-0ubuntu0.14.04.1 for mysql-client but that is not InstVer, ignoring
Conflicts//Breaks against version 5.5.35+dfsg-1ubuntu1 for mysql-client but that is not InstVer, ignoring
Considering mysql-client-5.5:amd64 -3 as a solution to mariadb-client-5.5:amd64 0
Added mysql-client-5.5:amd64 to the remove list
Conflicts//Breaks against version 5.5.35+dfsg-1ubuntu1 for mysql-client-5.5 but that is not InstVer, ignoring
这段代码有 100 多行,全文如下:http://paste.ubuntu.com/11954323/
如何在 Ubuntu 14.04 上使用 mariadb 为 PHP5 构建依赖项?
答案1
PHP 包应该可以很好地与 Maria-DB 一起编译。只需从中手动选择 build-dep 包(debian/control
而不是使用)apt-get build-dep php5
,然后将Build-Depends
libmysqlclient-dev
Maria-DB 中的开发包更改为正确的包即可。