Package libapache2-mod-php5 is not available

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
ken605
帖子: 2
注册时间: 2009-11-29 20:47

Package libapache2-mod-php5 is not available

#1

帖子 ken605 » 2009-11-29 22:35

新安装了 server 9.1, 安装是选择了安装 LAMP, 但是检查看到php5 moduleb并没有安装,用
sudo apt-cache search php5检查,结果如下:
php5-cgi - server-side, HTML-embedded scripting language (CGI binary)
php5-common - Common files for packages built from the php5 source
php5-mysql - MySQL module for php5
没有 libapache2-mod-php5,用
sudo apt-get install libapache2-mod-php5
结果是
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libapache2-mod-php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libapache2-mod-php5 has no installation candidate
如果重装php5. 也是这个结果
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package php5 has no installation candidate

那位有此经验的,请不吝指点一下。
ken605
帖子: 2
注册时间: 2009-11-29 20:47

Re: Package libapache2-mod-php5 is not available

#2

帖子 ken605 » 2009-11-30 7:36

前面的问题找到了,是那台机器没有设置 dns, 在/etc/resolv.conf中设定nameserver后,可以安装了,安装后用 sudo a2enmod php5 检查,报告
Module php5 already enabled,apache也重启了, 但是php程序还是不work. 把libapache2-mod-php5删掉在重新安装,重启apache, 啊哈,这回全好了。
回复