以为 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.
答案1
如果您运行了该命令,则这些dotdeb.gpg
文件不应该在,那么您已经完成这些文件的处理,因此您可以删除它们。/etc/apt/sources.list.d/
cat dotdeb.gpg | sudo apt-key add -
至于/etc/apt/sources.list.d/sources.list
,deb
必须全部小写。 大写D
。
Ubuntu 基于 Debian,但与 Debian 并不相同。Debian 的说明通常适用于 Ubuntu,但通常不适用于 Ubuntu。