首 页文章中心

Linux学习网

您的位置Linux学习网 > Linux服务器应用 > 文章内容

ubuntu7.04下安装Apache2

作者:佚名  来源:不详  发布时间:2008-7-8 8:22:00
总是提示错误:

正在设置 apache (1.3.34-2ubuntu0.1) ...

dpkg:处理 apache (--configure)时出错:

子进程·post-installation script·返回了错误号·10

在处理时有错误发生:

apache
E: Sub-process /usr/bin/dpkg returned an error code (1)

百度了一下,没什么头绪,看到有个人说最后又install了一下就好了,不解。

加上这两天总是遇到的依赖库问题(总是提示这个库需要那个库的依赖,然后那个库没有被标记,所以这个库就无法安装),因此扣掉10分7.04的印象分。

没办法,只好去包管理器查看,发现有个old版本的apache在里面,与新的apache2共存,因此就索性全都卸掉,然后装apache2。

之后 sudo /etc/init.d/apache2 start

* Starting apache 2.0 web server...
apache2: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd (pid 11360) already running
[ OK ]

地址竟然是127.0.1.1,诡异。

gedit /etc/hosts,127.0.0.1和127.0.1.1都登记了。再次百度一下,把127.0.0.1对应的localhost后面加上自己的用户名即可。

sudo /etc/init.d/apache2 restart,ff里输入127.0.0.1 或者 http://localhost/,succ。
收藏本页到: 365Key | del.icio.us | | 添加到雅虎收藏+
  • 网站帮助 - 广告合作 - 网站地图