在Debian 6.0.5上更新到PHP 5.4

想象一下,在Google上会有一个简单的答案,但没有运气。 大多数教程虽然与我需要的类似,但不适用于Debian

http://chemicaloliver.net/internet/installing-php-5-4-in-ubuntu/

add-apt-repository ppa:ondrej/php5 

收益率:

 -bash: add-apt-repository: command not found 

和这里的步骤: http : //vjetnamnet.com/how-to-install-php-5-4-on-debian-using-dotdeb-repository/获取

 apt-get update N: Ignoring file 'dotdeb.gpg' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension N: Ignoring file 'dotdeb.gpg.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension E: Type 'Deb' is not known on line 1 in sources list /etc/apt/sources.list.d/sources.list E: The list of sources could not be read. 

dotdeb.gpg文件不应位于/etc/apt/sources.list.d/如果您运行了cat dotdeb.gpg | sudo apt-key add - cat dotdeb.gpg | sudo apt-key add - command,那么你完成了这些文件,所以你可以删除它们。

至于/etc/apt/sources.list.d/sources.list必须全部小写。 你有一个大写D

Ubuntu是基于Debian的,但是和Debian不一样。 Debian的说明通常在Ubuntu上工作,但通常不会。