zoukankan      html  css  js  c++  java
  • rhel5上使用源代码安装mysql4.0.x

    1.在rhel5.1上安装mysql-4.0.18, configure的时候报如下错误:

    configure: error: This is a linux system and Linux threads was not
    found. On linux Linuxthreads should be used.  Please install Linuxthreads
    (or a new glibc) and try again.  See the Installation chapter in the
    Reference Manual for more information.

    看来需要新版本的glibc;configure的时候增加参数 --with-named-thread-libs="-lpthread" ;顺利通过。

    2.不过make的时候又出错了
    mysqld.o: In function `main':
    mysqld.cc:(.text+0x3ee0): undefined reference to `my_fast_mutexattr'
    mysqld.o:mysqld.cc:(.text+0x4143): more undefined references to `my_fast_mutexattr' follow
    collect2: ld returned 1 exit status
    make[4]: *** [mysqld] Error 1
    make[4]: Leaving directory `/usr/local/src/mysql-4.0.26/sql'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/usr/local/src/mysql-4.0.26/sql'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/usr/local/src/mysql-4.0.26/sql'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/mysql-4.0.26'
    make: *** [all] Error 2

    在mysql-4.0.26/sql/sql_class.cc文件中的
    #include <assert.h>
    (约39行)语句下面写如下代码

    #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
    pthread_mutexattr_t my_fast_mutexattr;
    #endif

    make顺利通过;

    3.我按照上面的步骤坐下来仍然报错,最后直接修改mysql-4.0.26/sql/sql_class.cc文件,添加pthread_mutexattr_t my_fast_mutexattr;,不知道有没有什么影响。

  • 相关阅读:
    盾机
    隐藏服务器真实IP的方法来防止DDOS攻击
    EJS 是什么 ,怎么用,以及优点
    Centos7 / RHEL 7 双网卡绑定
    linux下配置双网卡及RAC规划——1
    Why React Is Favored by Front-End Specialists
    React Virtual DOM Explained in Simple English
    React Core Features
    Virtual DOM--react
    redux是全局状态(数据)的管理机制,局部数据没有意义
  • 原文地址:https://www.cnblogs.com/ylqmf/p/2360414.html
Copyright © 2011-2022 走看看