zoukankan      html  css  js  c++  java
  • boa移植过程中出现的问题

    1>. 错误1: gethostbyname:: No such file or directory

         解决办法: 修改boa.conf   去掉 ServerName www.your.org.here 前的注释符号(#)

    2>. 错误1: util.c:100:1: error: pasting "t" and "->"does not give a valid preprocessing token make: *** [util.o]

         解决办法: 修改 src/compat.h

       找到

       #defineTIMEZONE_OFFSET(foo) foo##->tm_gmtoff

       修改成

       #defineTIMEZONE_OFFSET(foo) (foo)->tm_gmtoff

    3>. 错误2: boa.c:211 - getpwuid: No such file or directory

         解决办法: 修改src/boa.c

       注释掉下面这段程序:

       if (passwdbuf == NULL) {

       DIE(”getpwuid”);

       }

       if(initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {

       DIE(”initgroups”);

       }

      即修改为:

      #if 0

       if (passwdbuf == NULL) {

       DIE(”getpwuid”);

       }

       if(initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1) {

       DIE(”initgroups”);

       }

      #endif

     4>. 错误3: boa.c:228 - icky Linux kernel bug!: No such file or directory

        解决办法: 修改src/boa.c

      注释掉下面语句:

      if(setuid(0) != -1) {

      DIE(”icky Linux kernel bug!”);

      }

      即修改为:

      #if 0

       if(setuid(0) != -1) {

       DIE(”icky Linux kernel bug!”);

       }

      #endif

     5>. 错误4: log.c:73 unable to dup2 the error log:bad file descriptor

        解决方法:

        方法1> 确定日志目录对与所有用户都具有可读/写的权限

        方法2> 修改src/log.c (建议采用方法1)

      注释掉

      if(dup2(error_log, STDERR_FILENO) == -1) {

      DIE("unableto dup2 the error log");

      }

      即修改为:

      #if 0

        if (dup2(error_log, STDERR_FILENO) == -1) {

      DIE("unable to dup2 the error log");

       }

       #endif
    ————————————————
    版权声明:本文为CSDN博主「老徐拉灯」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/xdw1985829/article/details/6672742

  • 相关阅读:
    通过 Ansible role 安装 Jenkins Server
    常见 Bash 内置变量介绍
    Ansible 简介
    为容器化的 Go 程序搭建 CI
    Bash Shebang 小结
    Docker Compose 引用环境变量
    Docker Compose 之进阶篇
    Docker Compose 原理
    WEB程序调用客户端程序
    读书笔记2014第5本:《乔纳森传》
  • 原文地址:https://www.cnblogs.com/lixuejian/p/12564454.html
Copyright © 2011-2022 走看看