为什么 do-release-upgrade 20.04->22.04 会安装 apache httpd?

为什么 do-release-upgrade 20.04->22.04 会安装 apache httpd?

刚刚将 20.04 升级到 22.04,一切顺利(缺少 1 个小错误),令我惊讶的是,do-release-upgrade 安装了 apache httpd!不幸的是,我需要端口 80 来做其他事情,这让我有两个问题:

  1. 为什么do-release-upgrade 20.04->22.04会安装apache httpd?

  2. 删除 do-release-upgrade 的 apache httpd 会有什么后果?(我需要端口 80 用于 Docker 操作,据我所知我不需要 apache httpd 用于任何事情)

编辑:似乎与我安装的 php-fpm 和 php-cli 有关(用于 nginx,而不是 apache):

root@devad22:/home/hans# aptitude why apache2
i   php                   Depends    php8.1                                         
i A php8.1                Depends    libapache2-mod-php8.1 | php8.1-fpm | php8.1-cgi
i A libapache2-mod-php8.1 Recommends apache2                                        

答案1

看来,如果你在升级之前PHP安装了该软件包,但没有安装该apache2软件包,那么 do-release-upgrade 会apache2在升级过程中安装,引用升级/var/log/dist-upgrade/apt.log日志:

  MarkInstall php:amd64 < 2:7.4+75 -> 2:8.1+92ubuntu1 @ii umU Ib > FU=0
  Installing php8.1 as Depends of php
    MarkInstall php8.1:amd64 < none -> 8.1.2-1ubuntu2.2 @un uN Ib > FU=0
    Installing libapache2-mod-php8.1 as Depends of php8.1
      MarkInstall libapache2-mod-php8.1:amd64 < none -> 8.1.2-1ubuntu2.2 @un uN Ib > FU=0
      Installing php8.1-cli as Depends of libapache2-mod-php8.1
        MarkInstall php8.1-cli:amd64 < none -> 8.1.2-1ubuntu2.2 @un uN Ib > FU=0
        Installing php8.1-opcache as Depends of php8.1-cli
          MarkInstall php8.1-opcache:amd64 < none -> 8.1.2-1ubuntu2.2 @un uN > FU=0
        Installing php8.1-readline as Depends of php8.1-cli
          MarkInstall php8.1-readline:amd64 < none -> 8.1.2-1ubuntu2.2 @un uN > FU=0
      Installing apache2-bin as Depends of libapache2-mod-php8.1
        MarkInstall apache2-bin:amd64 < none -> 2.4.52-1ubuntu4.1 @un uN Ib > FU=0
        Installing libapr1 as Depends of apache2-bin
          MarkInstall libapr1:amd64 < none -> 1.7.0-8build1 @un uN > FU=0
        Installing libaprutil1 as Depends of apache2-bin
          MarkInstall libaprutil1:amd64 < none -> 1.6.1-5ubuntu4 @un uN > FU=0
        Installing libaprutil1-dbd-sqlite3 as Depends of apache2-bin
          MarkInstall libaprutil1-dbd-sqlite3:amd64 < none -> 1.6.1-5ubuntu4 @un uN > FU=0
        Installing libaprutil1-ldap as Depends of apache2-bin
          MarkInstall libaprutil1-ldap:amd64 < none -> 1.6.1-5ubuntu4 @un uN > FU=0
        Installing liblua5.3-0 as Depends of apache2-bin
          MarkInstall liblua5.3-0:amd64 < none -> 5.3.6-1build1 @un uN > FU=0
      Installing apache2 as Recommends of libapache2-mod-php8.1
        MarkInstall apache2:amd64 < none -> 2.4.52-1ubuntu4.1 @un uN Ib > FU=0
        Installing apache2-data as Depends of apache2
          MarkInstall apache2-data:amd64 < none -> 2.4.52-1ubuntu4.1 @un uN > FU=0
        Installing apache2-utils as Depends of apache2
          MarkInstall apache2-utils:amd64 < none -> 2.4.52-1ubuntu4.1 @un uN > FU=0
  1. 为什么do-release-upgrade 20.04->22.04会安装apache httpd?

irc://irc.libera.chat#Ubuntu 上的人们似乎认为这是一个依赖性错误

  1. 删除 do-release-upgrade 的 apache httpd 会有什么后果?(我需要端口 80 用于 Docker 操作,据我所知我不需要 apache httpd 用于任何事情)

我最好的猜测是,没有后果

相关内容