Debian

軟體包未顯示在 aptitude

  • July 22, 2017

我剛剛從 Debian 7 升級到 9 的伺服器上有一個非常奇怪的問題。它沒有列出一些應該存在於其儲存庫中的軟體包…

$ cat /etc/apt/sources.list
deb http://ftp.de.debian.org/debian/ stable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable main contrib non-free

deb http://ftp.de.debian.org/debian/ stable-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable-updates main contrib non-free

deb http://security.debian.org/ stable/updates main
deb-src http://security.debian.org/ stable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main
$ aptitude update
Hit http://ftp.debian.org/debian stretch-backports InRelease
Hit http://security.debian.org stable/updates InRelease
Ign http://ftp.de.debian.org/debian stable InRelease
Hit http://ftp.de.debian.org/debian stable-updates InRelease
Hit http://ftp.de.debian.org/debian stable Release
Deleting obsolete downloaded files       

$ aptitude search php5-
i A php5-cli                                                                        - command-line interpreter for the php5 scripting language
i A php5-common                                                                     - Common files for packages built from the php5 source
i   php5-curl                                                                       - CURL module for php5
i A php5-json                                                                       - JSON module for php5
v   php5-mhash                                                                      -
i A php5-readline                                                                   - Readline module for php5
$

它列出了已經安裝的軟體包 - 但應該還有更多……有人有什麼想法嗎?

Debian現在在 php7.0 上。

如果您需要安裝舊的 php5,我認為可以將jessie(Debian 8)添加到您的 apt 源中,並從那裡仔細安裝 php5 包,但是如果他們嘗試引入 XML 庫等可能會發生衝突比 Debian 9 的版本舊。

引用自:https://serverfault.com/questions/863566