Ubuntu 18.10 无法安装 php7.2-dev 来安装 phpize

Ubuntu 18.10 无法安装 php7.2-dev 来安装 phpize

我仍然遇到问题在 Ubuntu 18.10 上使用 ondrej 包。我想为 firebase 安装 php-dev。当我尝试使用 pecl 安装 grpc 时,它提示我 phpize 不存在,当我检查我需要的内容时,它来自 php7.2-dev。我检查了保留的包,但那里什么都没有。

我尝试按照你说的降级,但看起来像解释这里

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version ‘2:8.39-9’ for ‘libpcre3’ was not found
E: Version ‘2:8.39-9’ for ‘libpcre3-dev’ was not found

和:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version ‘1.1.0g-2ubuntu4.1’ for ‘libssl1.1’ was not found
E: Version ‘1.1.0g-2ubuntu4.1’ for ‘libssl-dev’ was not found

先感谢您。

答案1

让我们看看 Ununtu 存储库中这些包的可用来源:

$ apt-cache madison libpcre3
  libpcre3 |  2:8.39-11 | http://us.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages

啊,问题来了。在 18.10 上,你告诉 apt 安装 -9 而不是 -11。你试图安装 18.10 存储库中没有的旧版本。这意味着你不明智地添加了非 Ubuntu 源,该源适用于较旧版本的 Ubuntu(例如 18.04)。

当从 Debian 源代码构建 Ubuntu 版本时,所有版本都是同步的。所有数千个软件包都依赖于每个依赖项的单个版本。然后该版本进入存储库。这就是为什么 Ubuntu 被称为快照发行版。更改版本时,可能会破坏所有这些依赖项。这就是为什么发布升级涉及替换数千个软件包的原因……所有依赖项都必须更新到新快照。

你遇到的问题是由于尝试将具有 18.04 依赖项的软件包添加到 18.10 系统而导致的。如果没有专家的持续维护,它将无法工作。您可以将 18.10 软件包添加到 18.10 系统,也可以将 18.04 软件包添加到 18.04 系统。但您不能跨版本,因为这样做可能会严重破坏您的系统,因此整个发行版、存储库、发布和 apt 都设置为阻止您这样做。

现在让我们看一下libssl:

$ apt-cache madison libssl1.1
 libssl1.1 | 1.1.1-1ubuntu2.1 | http://us.archive.ubuntu.com/ubuntu cosmic-updates/main amd64 Packages
 libssl1.1 | 1.1.1-1ubuntu2.1 | http://security.ubuntu.com/ubuntu cosmic-security/main amd64 Packages
 libssl1.1 | 1.1.1-1ubuntu2 | http://us.archive.ubuntu.com/ubuntu cosmic/main amd64 Packages

同样的问题。版本 1.1.0g-2ubuntu4.1 位于 18.04 中,而不是 18.10 中。您正尝试将 18.04 软件包添加到 18.10 系统中。停止这样做。

相关内容