AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 770470
Accepted
Guerrilla
Guerrilla
Asked: 2016-04-15 16:51:03 +0800 CST2016-04-15 16:51:03 +0800 CST 2016-04-15 16:51:03 +0800 CST

“sudo apt-get install php7.0-dev”不工作

  • 772

我正在尝试将 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。

关于如何安装 php dev 的任何建议?

ubuntu php php-fpm ubuntu-14.04 xdebug
  • 5 5 个回答
  • 8537 Views

5 个回答

  • Voted
  1. Best Answer
    tudor -Reinstate Monica-
    2016-04-15T19:32:54+08:002016-04-15T19:32:54+08:00

    php7.0-dev 不在可信赖的存储库中(请参阅此处),因此它的一些/许多依赖项也不会在该存储库中。

    简单的答案

    下周 2016 年 4 月 21 日正式发布时升级到 16.04 LTS xenial。它具有 php7.0-dev 及其所有依赖项。见这里。

    很难回答

    您也许可以手动安装依赖包。如果您访问http://packages.ubuntu.com/xenial/php7.0-dev并手动下载每个软件包,然后使用软件中心或dpkg -i.

    我在这个过程中取得了喜忧参半的成功。您很有可能会遇到需要更新的核心库(例如 libc6)的包。

    祝你好运!

    • 1
  2. Pushp
    2018-01-05T09:44:52+08:002018-01-05T09:44:52+08:00

    我将 ubuntu 从 14.04 升级到 16.06。

    我不得不用 sudo a2dismod php5.6 禁用 php 5.6 并启用 php 7.0 sudo a2enmod php7.0。

    我在安装 php7.0-dev 时开始收到相同的错误消息

    这对我来说很好。

    sudo apt install libpcre3=2:8.38-3.1 libpcre3-dev=2:8.38-3.1 然后 sudo apt-get install php7.0-dev

    • 1
  3. tanner
    2016-04-15T19:25:02+08:002016-04-15T19:25:02+08:00

    根据AskUbuntu,尝试dpkg --get-selections | grep hold。

    如果列出了任何软件包,请将其删除。如果这不起作用,请尝试apt-get autoremove

    • 0
  4. heyyo
    2017-05-19T23:18:22+08:002017-05-19T23:18:22+08:00

    我遇到了同样的问题,因为我将表单 14.04 升级到 16.04 并且库 libpcre3 没有升级。

    强制从 Ubuntu 16.04 安装此库的版本,修复了问题: 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

    • 0
  5. Laucktba
    2017-05-20T00:56:17+08:002017-05-20T00:56:17+08:00

    您是否尝试过使用“sudo phpdismod xdebug”或“sudo phpenmod xdebug”?

    • 0

相关问题

  • 无法通过 Ubuntu VPN 访问外部网络

  • ubuntu apt-get upgrade - 如何在 shell 中单击确定?

  • VirtualBox 上 Ubuntu 的访客优化技巧 [关闭]

  • 外部硬盘上的 virtualbox 虚拟硬盘驱动器(Vista 主机上的 ubuntu 客户机)

  • 如何在 Ubuntu 上挂载 LVM 分区?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve