我们正在更新我们的内部开发服务器之一(运行Ubuntu的旧版本,我猜测是8或9),并且在使用apt-get升级/安装软件包时遇到错误。 以下是试图安装zip的控制台输出:
me@server:~$ sudo apt-get install zip Reading package lists... Done Building dependency tree Reading state information... Done zip is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. Setting up libapache2-svn (1.5.1dfsg1-1ubuntu2.1) ... Considering dependency dav for dav_svn: Module dav already enabled ERROR: Config file dav_svn.conf not properly enabled: /etc/apache2/mods-enabled/dav_svn.conf is a real file, not touching it dpkg: error processing libapache2-svn (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: libapache2-svn E: Sub-process /usr/bin/dpkg returned an error code (1) me@server:~$
根本问题似乎是:
ERROR: Config file dav_svn.conf not properly enabled: /etc/apache2/mods-enabled/dav_svn.conf is a real file, not touching it
该文件的权限:
-rw-r--r-- 1 root root 1099 2009-09-08 16:32 /etc/apache2/mods-enabled/dav_svn.conf
谷歌并没有太多,我不知道如何“正确启用”该configuration文件。 (或者为什么会阻止apt-get的运行?)
在/ etc / apache2 / mods-enabled中,你只应该有/ etc / apache2 / mods-available的链接。 因此,将/etc/apache2/mods-enabled/dav_svn.conf移动到/etc/apache2/mods-software,执行a2enmod dav_svn,然后重新启动安装过程。
原来的文件不应该存储在mods-enabled ,而应该存放在mods-available 。 然后应该在mods-enabled创build一个符号链接,指向保存在mods-available的文件。
闭幕时:
首先删除原件:
mv /etc/apache2/mods-enabled/dav_svn.conf /etc/apache2/mods-available/
然后创build符号链接:
ln -s /etc/apache2/mods-available/dav_svn.conf /etc/apache2/mods-enabled/dav_svn.conf
我的第一个猜测是它可能试图在安装libapache2-svn之后重新启动apache,当它尝试重新启动时,由于dav_svn.conf中的configuration错误而无法启动。 尝试使用a2dismod命令禁用它。 或者把dav_svn.conf移出启用mods的文件夹。