我正在尝试运行gdb来调试我的Ubuntu9.10 Apache2安装,并且有几个问题:
以下是调试器会话的输出:
root@aj-ubuntu:/usr/sbin# gdb apache2
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/apache2...(no debugging symbols found)...done.
(gdb) run -X
Starting program: /usr/sbin/apache2 -X
[Thread debugging using libthread_db enabled]
apache2: bad user name ${APACHE_RUN_USER}
Program exited with code 01.
(gdb)谢谢你,-aj
发布于 2010-01-08 03:00:20
对于第一个Ubuntu,运行一个符号服务器:https://lists.ubuntu.com/archives/ubuntu-devel-announce/2006-September/000195.html
对于看起来像apache配置问题的第二个问题,当init脚本启动时,apache会运行peoperly吗?
发布于 2013-12-14 06:22:56
在直接调用二进制文件之前,需要设置环境变量。如果您想在基于Debian的发行版中使用sudo进行此操作,可以使用:
source /etc/apache2/envvars
sudo -E gdb /usr/sbin/apache2发布于 2012-03-01 19:11:50
在bash中运行命令source /etc/apache2/envvars为我加载了必要的变量。
https://serverfault.com/questions/100506
复制相似问题