您需要将旧的stable(wheezy)存储库添加到apt源列表中.
在以下位置创建文件:
/etc/apt/sources.list.d/wheezy.list
并添加以下内容:
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
运行以下命令来更新repo信息并安装php5.4.44
apt-get update
apt-get install php5=5.4.44-0+deb7u1
你应该考虑版本固定.你可以这样做:
在以下位置创建文件:
/etc/apt/preferences.d/php5
Package: php5*
Pin: release a=oldstable
Pin-Priority: 700
Package: php-*
Pin: release a=oldstable
Pin-Priority: 700
编辑:PHP5.4的版本已更新为5.4.45,因此您可以在安装此特定版本之前进行版本查找,只需将版本号替换为最新版本.