当我给出sudo apt-get install php5
命令时,它响应并显示错误消息“无法找到 php5”
答案1
嗯,它肯定在里面(证据如下,这里)。
oli@tim:~$ apt-cache policy php5
php5:
Installed: (none)
Candidate: 5.3.3-1ubuntu9.3
Version table:
5.3.3-1ubuntu9.3 0
500 http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu/ maverick-security/main i386 Packages
5.3.3-1ubuntu9 0
500 http://gb.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
oli@tim:~$
oli@tim:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
建议:
这是一个新系统吗?您
sudo apt-get update
已经运行了吗?你是
/etc/apt/sources.list
不是已经彻底堕落了?至少应该具备以下几点:deb http://archive.ubuntu.com/ubuntu/ maverick main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ maverick-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ maverick-updates main restricted universe multiverse deb http://archive.canonical.com/ubuntu maverick partner
答案2
您的存储库配置可能有问题...
在这里发布输出
more /etc/apt/sources.list
php5 在“主”存储库中,因此你应该有一些变体
deb http://archive.ubuntu.com/ubuntu maverick main