运行 debian 4.0
尝试
$ apt-get install php5
我明白了
Reading package lists... Done
Building dependency tree... Done
php5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
4 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up apache2.2-common (2.2.3-4+etch11) ...
chown: `www-data': invalid user
dpkg: error processing apache2.2-common (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of apache2-mpm-prefork:
apache2-mpm-prefork depends on apache2.2-common (= 2.2.3-4+etch11); however:
Package apache2.2-common is not configured yet.
dpkg: error processing apache2-mpm-prefork (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php5:
libapache2-mod-php5 depends on apache2-mpm-prefork (>> 2.0.52) | apache2-mpm-itk; however:
Package apache2-mpm-prefork is not configured yet.
Package apache2-mpm-itk is not installed.
libapache2-mod-php5 depends on apache2.2-common; however:
Package apache2.2-common is not configured yet.
dpkg: error processing libapache2-mod-php5 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5:
php5 depends on libapache2-mod-php5 (>= 5.2.0+dfsg-8+etch16) | libapache-mod-php5 (>= 5.2.0+dfsg-8+etch16) | php5-cgi (>= 5.2.0+dfsg-8+etch16); however:
Package libapache2-mod-php5 is not configured yet.
Package libapache-mod-php5 is not installed.
Package php5-cgi is not installed.
dpkg: error processing php5 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
apache2.2-common
apache2-mpm-prefork
libapache2-mod-php5
php5
E: Sub-process /usr/bin/dpkg returned an error code (1)
可能是什么问题呢 ?
答案1
有人从系统中删除了该www-data
用户。您已将 Apache 重新配置为使用其他用户,这很好,但它www-data
是 Debian 软件包可能假定存在的核心系统用户集的一部分,即使您没有使用它。apache2.2 postinst
-common 软件包的脚本将某个文件的所有权更改为该用户并假定它存在,如果不存在则失败。
Debian 6.0 中的 Apache 软件包似乎已修复此问题。Debian 4.0 相当老旧。但最直接的解决方法是重新创建用户www-data
。