Debian dist-upgrade 删除了 apache2

Debian dist-upgrade 删除了 apache2

我正在运行 Debian 8.11 (Jessie) 盒子,上面有一些 Web 应用程序。现在我想使用以下命令在服务器上安装所有待处理的更新

apt-get-update
apt-get upgrade

屏幕上显示的内容如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  apache2 apache2-bin apache2-data apache2-utils certbot libaugeas0 libssl1.1 python-cffi-backend python-cryptography python-openssl python-pbr python-psutil python-requests python-six python-urllib3
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.

然后我想我可以继续使用

apt-get dist-upgrade

首先产生了以下内容:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
  apache2-data
Use 'apt-get autoremove' to remove it.
Done
The following packages will be REMOVED:
  apache2 libapache2-mod-php5 mailman mod-pagespeed-stable python-certbot-apache
The following packages have been kept back:
  certbot python-cffi-backend python-pbr python-psutil python-six python-urllib3
The following packages will be upgraded:
  apache2-data apache2-utils
2 upgraded, 0 newly installed, 5 to remove and 6 not upgraded.
Need to get 0 B/400 kB of archives.
After this operation, 69.2 MB disk space will be freed.
Do you want to continue? [Y/n]

选择“Y”后,我不再安装 Apache Web 服务器,并且没有机会重新安装它。

我现在的问题是:
- 这是怎么回事?
- 这是因为系统已经太旧了吗?
- 我该怎么做才能使用仍在运行的 apache 网络服务器(以及所有其他服务)来更新系统
- 如果可能的话,我还想升级到最新的 debian 版本

我看到了一些关于如何升级 Debian 的提示,但它们都以完成 dist-upgrade 为先决条件……

非常感谢您的帮助。

最好的汤姆

答案1

8如果您正在执行从 Jessie ( ) 到 Stretch ( 9) 或 Buster ( )的发行版升级,10问题可能是从 Debian 8 到 Debian 9,Apache 版本从版本升级到了我认为2.2的版本2.4

这两个版本彼此不兼容,因此无法进行简单的升级。由于依赖性解析,Apache 软件包版本 2.2 被删除,dist-upgrade因为它们与其他软件包冲突。

dist-upgrade只要新版 Debian 中没有缺少依赖项,您就可以执行完整安装,然后重新安装 apache2。

答案2

我现在终于知道为什么更新会导致我的系统崩溃了!我将“测试”存储库添加到我的 sources.list 文件中。删除该条目后,更新立即生效!感谢所有提示!

谨致问候,汤姆

相关内容