Chinaunix

标题: apache 在安装后的启动时报错。急等解决方法。 [打印本页]

作者: birdeng    时间: 2004-08-18 11:43
标题: apache 在安装后的启动时报错。急等解决方法。
请问大家,我在安装好APACHE后,在开启服务时出现一下错误。希望大家协助解决一下。
Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not included in the server configuration
/usr/local/apache/bin/apachectl start: httpd could not be started

请问我该如何解决。

谢谢。
作者: HonestQiao    时间: 2004-08-18 11:48
标题: apache 在安装后的启动时报错。急等解决方法。
不是提示了205这个地方有错误吗,你把这个上下500行的配置代码贴上来看看。
作者: birdeng    时间: 2004-08-18 11:55
标题: apache 在安装后的启动时报错。急等解决方法。
谢谢版主关心。
应该就是下面这部分了。

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file http://httpd.apache.org/docs/dso.html for more
# details about the DSO mechanism and run `httpd -l' for the list of already
# built-in (statically linked and thus always available) modules in your httpd
# binary.
#
# Note: The order in which modules are loaded is important.  Don't change
# the order below without expert advice.
#
# Example:  ((((应该这里就是提示错误的地方了)))
# LoadModule foo_module libexec/mod_foo.so
LoadModule mmap_static_module libexec/mod_mmap_static.so
LoadModule vhost_alias_module libexec/mod_vhost_alias.so
LoadModule env_module         libexec/mod_env.so
LoadModule config_log_module  libexec/mod_log_config.so
LoadModule agent_log_module   libexec/mod_log_agent.so
LoadModule referer_log_module libexec/mod_log_referer.so
LoadModule mime_magic_module  libexec/mod_mime_magic.so
LoadModule mime_module        libexec/mod_mime.so
LoadModule negotiation_module libexec/mod_negotiation.so
LoadModule status_module      libexec/mod_status.so
LoadModule info_module        libexec/mod_info.so
LoadModule includes_module    libexec/mod_include.so
LoadModule autoindex_module   libexec/mod_autoindex.so
LoadModule dir_module         libexec/mod_dir.so
LoadModule cgi_module         libexec/mod_cgi.so
LoadModule asis_module        libexec/mod_asis.so
LoadModule imap_module        libexec/mod_imap.so
LoadModule action_module      libexec/mod_actions.so
LoadModule speling_module     libexec/mod_speling.so
LoadModule userdir_module     libexec/mod_userdir.so
LoadModule alias_module       libexec/mod_alias.so
LoadModule rewrite_module     libexec/mod_rewrite.so
LoadModule access_module      libexec/mod_access.so
LoadModule auth_module        libexec/mod_auth.so
LoadModule anon_auth_module   libexec/mod_auth_anon.so
LoadModule dbm_auth_module    libexec/mod_auth_dbm.so
#LoadModule db_auth_module     libexec/mod_auth_db.so
LoadModule digest_module      libexec/mod_digest.so
LoadModule proxy_module       libexec/libproxy.so
LoadModule cern_meta_module   libexec/mod_cern_meta.so
LoadModule expires_module     libexec/mod_expires.so
LoadModule headers_module     libexec/mod_headers.so
LoadModule usertrack_module   libexec/mod_usertrack.so
LoadModule example_module     libexec/mod_example.so
LoadModule unique_id_module   libexec/mod_unique_id.so
LoadModule setenvif_module    libexec/mod_setenvif.so
#LoadModule ssl_module         libexec/libssl.so

#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_log_config.c
AddModule mod_log_agent.c
AddModule mod_log_referer.c
AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_dbm.c
#AddModule mod_auth_db.c
AddModule mod_digest.c
AddModule mod_proxy.c
AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_usertrack.c
AddModule mod_example.c
AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
#AddModule mod_ssl.c

#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#
作者: HonestQiao    时间: 2004-08-18 12:00
标题: apache 在安装后的启动时报错。急等解决方法。
请你明确标出205行出错的是哪一行
作者: HonestQiao    时间: 2004-08-18 12:01
标题: apache 在安装后的启动时报错。急等解决方法。
等等,你先说说你是怎么安装的
作者: birdeng    时间: 2004-08-18 12:04
标题: apache 在安装后的启动时报错。急等解决方法。
我原来安装的是1.3.27版的APACHE,现在我把他升级成1.3.31版。
方法很简单啊,停止原来的服务后,
./CONFIGURE
MAKE
MAKE INSTALL
这个过程都很正常啊。
只是在运行的时候出现上面的错误。

提到的205 应该是下面这行“
LoadModule mmap_static_module libexec/mod_mmap_static.so ”

麻烦兄弟了。
作者: birdeng    时间: 2004-08-18 12:06
标题: apache 在安装后的启动时报错。急等解决方法。
原来运行的很正常的。1.3.27那个版本已经正常使用1年多了。
作者: HonestQiao    时间: 2004-08-18 12:28
标题: apache 在安装后的启动时报错。急等解决方法。
你把这一行注释掉了,然后重新启动看看。
作者: HonestQiao    时间: 2004-08-18 12:28
标题: apache 在安装后的启动时报错。急等解决方法。
还有,你再找找你刚才的安装文件,运行
./configure --help
把结果贴出来
作者: birdeng    时间: 2004-08-18 13:11
标题: apache 在安装后的启动时报错。急等解决方法。
./configure --help
后的内容。
先贴出来,我试试你的建议。



Usage: configure [options]
Options: [defaults in brackets after descriptions]
General options:
--quiet, --silent      do not print messages
--verbose, -v          print even more messages
--shadow[=DIR]         switch to a shadow tree (under DIR) for building

Stand-alone options:
--help, -h             print this message
--show-layout          print installation path layout (check and debug)

Installation layout options:
--with-layout=[F:]ID   use installation path layout ID (from file F)
--target=TARGET        install name-associated files using basename TARGET
--prefix=PREFIX        install architecture-independent files in PREFIX
--exec-prefix=EPREFIX  install architecture-dependent files in EPREFIX
--bindir=DIR           install user     executables in DIR
--sbindir=DIR          install sysadmin executables in DIR
--libexecdir=DIR       install program  executables in DIR
--mandir=DIR           install manual pages in DIR
--sysconfdir=DIR       install configuration files in DIR
--datadir=DIR          install read-only data files in DIR
--iconsdir=DIR         install read-only icon files in DIR
--htdocsdir=DIR        install read-only welcome pages in DIR
--manualdir=DIR        install read-only on-line documentation in DIR
--cgidir=DIR           install read-only cgi files in DIR
--includedir=DIR       install includes files in DIR
--localstatedir=DIR    install modifiable data files in DIR
--runtimedir=DIR       install runtime data in DIR
--logfiledir=DIR       install logfile data in DIR
--proxycachedir=DIR    install proxy cache data in DIR

Configuration options:
--enable-rule=NAME     enable  a particular Rule named 'NAME'
--disable-rule=NAME    disable a particular Rule named 'NAME'
                        [CYGWIN_WINSOCK=no DEV_RANDOM=default EXPAT=defa]
                        [IRIXN32=yes     IRIXNIS=no      PARANOID=no    ]
                        [SHARED_CHAIN=default SHARED_CORE=default SOCKS4]
                        [SOCKS5=no       WANTHSREGEX=default            ]
--add-module=FILE      on-the-fly copy & activate a 3rd-party Module
--activate-module=FILE on-the-fly activate existing 3rd-party Module
--permute-module=N1:N2 on-the-fly permute module 'N1' with module 'N2'
--enable-module=NAME   enable  a particular Module named 'NAME'
--disable-module=NAME  disable a particular Module named 'NAME'
                        [access=yes      actions=yes     alias=yes      ]
                        [asis=yes        auth=yes        auth_anon=no   ]
                        [auth_db=no      auth_dbm=no     auth_digest=no ]
                        [autoindex=yes   cern_meta=no    cgi=yes        ]
                        [digest=no       dir=yes         env=yes        ]
                        [example=no      expires=no      headers=no     ]
                        [imap=yes        include=yes     info=no        ]
                        [log_agent=no    log_config=yes  log_forensic=no]
                        [log_referer=no  mime=yes        mime_magic=no  ]
                        [mmap_static=no  negotiation=yes proxy=no       ]
                        [rewrite=no      setenvif=yes    so=no          ]
                        [speling=no      status=yes      unique_id=no   ]
                        [userdir=yes     usertrack=no    vhost_alias=no ]
--enable-shared=NAME   enable  build of Module named 'NAME' as a DSO
--disable-shared=NAME  disable build of Module named 'NAME' as a DSO
--with-perl=FILE       path to the optional Perl interpreter
--with-port=PORT       set the port number for httpd.conf
--without-support      disable the build and installation of support tools
--without-confadjust   disable the user/situation adjustments in config
--without-execstrip    disable the stripping of executables on installation
--server-uid=UID       set the user ID the web server should run as [nobody]
--server-gid=GID       set the group ID the web server UID is a memeber of [#-
]

suEXEC options:
--enable-suexec        enable the suEXEC feature
--suexec-caller=NAME   set the suEXEC username of the allowed caller [www]
--suexec-docroot=DIR   set the suEXEC root directory [PREFIX/share/htdocs]
--suexec-logfile=FILE  set the suEXEC logfile [PREFIX/var/log/suexec_log]
--suexec-userdir=DIR   set the suEXEC user subdirectory [public_html]
--suexec-uidmin=UID    set the suEXEC minimal allowed UID [100]
--suexec-gidmin=GID    set the suEXEC minimal allowed GID [100]
--suexec-safepath=PATH set the suEXEC safe PATH [/usr/local/bin:/usr/bin:/bin]
--suexec-umask=UMASK   set the umask for the suEXEC'd script [server's umask]

Deprecated options:
--layout               backward compat only: use --show-layout
--compat               backward compat only: use --with-layout=Apache
作者: 清瘦骆驼    时间: 2004-08-18 13:27
标题: apache 在安装后的启动时报错。急等解决方法。
你升级改变了原先的module ,你可以先停止它,然后apachectl -k start,一步一步测
作者: birdeng    时间: 2004-08-18 14:11
标题: apache 在安装后的启动时报错。急等解决方法。
请问我该如何停止原先的MODULE?
作者: 清瘦骆驼    时间: 2004-08-18 14:32
标题: apache 在安装后的启动时报错。急等解决方法。
sorry,一般出现这样的问题,大多数是因为php没有安装完全,可以选择不删除的方式,重新编译php这样要比添加module的方式要来到稳定
作者: 李暮楚    时间: 2004-08-18 18:06
标题: apache 在安装后的启动时报错。急等解决方法。
你们说怪不怪??我的httpd.conf就是没有 AddModule  LoadModule那一堆!俺用的是
Apache1.3.31.tar.gz???还有
php编译
./configure --with-mysql=/usr/local/src/mysql --with-apxs=/usr/local/apache/bin/apxs
make
make install
后居然没有libphp4.so产生!!!!
作者: birdeng    时间: 2004-08-19 10:25
标题: apache 在安装后的启动时报错。急等解决方法。
那你的apache能正常使用吗?
作者: birdeng    时间: 2004-08-19 11:39
标题: apache 在安装后的启动时报错。急等解决方法。
[quote]原帖由 "清瘦骆驼"]sorry,一般出现这样的问题,大多数是因为php没有安装完全,可以选择不删除的方式,重新编译php这样要比添加module的方式要来到稳定[/quote 发表:

兄弟,用了你的办法,我重新安装了PHP.可是错误依旧啊!

急切等待高手们来帮忙。
作者: birdeng    时间: 2004-08-19 11:47
标题: apache 在安装后的启动时报错。急等解决方法。
[quote]原帖由 "HonestQiao"]请你明确标出205行出错的是哪一行[/quote 发表:

我试用了你说的方法,把205行注销
#LoadModule vhost_alias_module libexec/mod_vhost_alias.so
可是系统在启动时又提示其下面一行错误。错误消息依旧
206行的内容是:
LoadModule env_module         libexec/mod_env.so

我考虑应该是

“LoadModule”的问题。但是,是什么造成这个出问题的我就不知道了。希望大家帮忙解决。谢谢。
作者: HonestQiao    时间: 2004-08-19 12:14
标题: apache 在安装后的启动时报错。急等解决方法。
那可能是你的apache编译春在问题,没有启动dso模式吧

你先看w.yi.org的fapm的关于apache编译的部分
作者: 清瘦骆驼    时间: 2004-08-19 12:22
标题: apache 在安装后的启动时报错。急等解决方法。
对呀,能运行正常吗,没有你说的那一快是正常的
作者: birdeng    时间: 2004-08-19 12:55
标题: apache 在安装后的启动时报错。急等解决方法。
现在又有新问题了。请问下面这个问题怎么解决啊。
我怎么找不到“libexpat.so.0”这个文件啊。
我重新安装了“bash-2.05”。但情况依旧。
# ./apachectl start
ld.so.1: /usr/local/apache/bin/httpd: fatal: libexpat.so.0: open failed: No such
file or directory
Killed
./apachectl start: httpd could not be started




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2