我想安装Xdebug到服务器和先决条件教程我以下是php5-dev,但我使用的是php7.0.5,所以我尝试了sudo apt-get install php7.0-dev 。
它给了我
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php7.0-dev : Depends: libpcre3-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.
我捆绑安装libpcre3并得到了关于另一个包类似的消息。 我不知道我在这里做什么,所以不知道该怎么做。
服务器是Ubuntu 14.04,Nginx 1.9.13,PHP7.0-FPM。
任何build议如何安装PHP开发?
php7.0-dev不在可靠的仓库中(见这里 ),所以它的一些/许多依赖关系也不会在仓库中。
简单的答案
当它在2016年4月21日下周正式发布时升级到16.04 LTS xenial。它具有php7.0-dev及其所有依赖项。 看到这里 。
很难回答
您可能能够手动安装相关软件包。 如果您访问http://packages.ubuntu.com/xenial/php7.0-dev并手动下载每个软件包,请使用软件中心或dpkg -i来安装它们。
我在这个过程中取得了混合的成功。 有一个合理的机会,你可能遇到一个需要更新的核心库(例如libc6)的软件包。
祝你好运!
根据AskUbuntu ,请尝试dpkg --get-selections | grep hold dpkg --get-selections | grep hold 。
如果列出了任何软件包,请将其删除。 如果这不起作用,请尝试apt-get autoremove
我有同样的问题,因为我升级forms14.04至16.04和图书馆libpcre3没有升级。
解决了这个问题:sudo apt install libpcre3 = 2:8.38-3.1 libpcre3-dev = 2:8.38-3.1
安装php7.0-dev很好用:sudo apt install php7.0-dev
你有没有尝试过使用'sudo phpdismod xdebug'或'sudo phpenmod xdebug'?