• 记一次oracle安装错误:INFO: //usr/lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14'


    --一次oracle安装错误,oracle version:11.2.0.1.0
    [root@localhost ~]# cat /etc/issue
    S
    Kernel on an m

    [root@localhost ~]# cat /etc/redhat-release
    CentOS Linux release 7.3.1611 (Core)
    [root@localhost ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH}) ' binutils
    > compat-libcap1
    > compat-libstdc++
    > gcc
    > gcc-c++
    > glibc
    > glibc-devel
    > ksh
    > libgcc
    > libstdc++
    > libstdc++-devel
    > libaio
    > libaio-devel
    > make
    > sysstat
    binutils-2.27-34.base.el7 (x86_64)
    compat-libcap1-1.10-7.el7 (x86_64)
    package compat-libstdc++ is not installed
    gcc-4.8.5-36.el7_6.2 (x86_64)
    gcc-c++-4.8.5-36.el7_6.2 (x86_64)
    glibc-2.17-260.el7_6.4 (x86_64)
    glibc-2.17-260.el7_6.4 (i686)
    glibc-devel-2.17-260.el7_6.4 (x86_64)
    glibc-devel-2.17-260.el7_6.4 (i686)
    ksh-20120801-139.el7 (x86_64)
    libgcc-4.8.5-36.el7_6.2 (x86_64)
    libgcc-4.8.5-36.el7_6.2 (i686)
    libgcc-4.1.2-48.el5 (i386)
    libstdc++-4.8.5-36.el7_6.2 (x86_64)
    libstdc++-4.8.5-36.el7_6.2 (i686)
    libstdc++-4.1.2-48.el5 (i386)
    libstdc++-devel-4.8.5-36.el7_6.2 (x86_64)
    libstdc++-devel-4.8.5-36.el7_6.2 (i686)
    libaio-0.3.109-13.el7 (x86_64)
    libaio-0.3.109-13.el7 (i686)
    libaio-0.3.106-5 (i386)
    libaio-devel-0.3.109-13.el7 (x86_64)
    libaio-devel-0.3.109-13.el7 (i686)
    libaio-devel-0.3.106-5 (i386)
    make-3.82-23.el7 (x86_64)
    sysstat-10.1.5-17.el7 (x86_64)

    INFO: //usr/lib64/libstdc++.so.5: undefined reference to `memcpy@GLIBC_2.14'
    collect2: error: ld returned 1 exit status
    
    INFO: make: *** [ctxhx] Error 1
    
    INFO: End output from spawned process.
    INFO: ----------------------------------
    INFO: Exception thrown from action: make
    Exception Name: MakefileException
    Exception String: Error in invoking target 'install' of makefile '/opt/oracle/product/11.2.0/dbhome_1/ctx/lib/ins_ctx.mk'. See '/opt/oracle/oraInventory/logs/installActions2019-05-07_02-48-01PM.log' for details.
    Exception Severity: 1
    INFO: Linking Text executables
    INFO: Linking Text executables
    INFO: The output of this make operation is also available at: '/opt/oracle/product/11.2.0/dbhome_1/install/make.log'
    INFO:

    尝试解决 --使用方法4
    1 下载glibc-static-2.17-55.el7.x86_64.rpm安装
    if [[ ! -f /usr/lib64/libc.a ]]; then yum -y install glibc-static; fi
    sed 's/.*$(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)$/-static /usr/lib64/libc.a $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK)/g' -i /u01/app/oracle/product/11.2.0/db_1/ctx/lib/ins_ctx.mk
    点击retry,还是报错

    2 libstdc++.so.5 libstdc++.so.5.0.7 替换包,还是无效

    3 重新下载低版本glibc-2.14.tar.gz 进行编译--未验证
    链接:http://blog.sina.com.cn/s/blog_6c5a47d30102wfw9.html
    # tar xvf glibc-2.14.tar.gz
    # cd glibc-2.14
    # mkdir build
    # cd ./build
    # ../configure --prefix=/opt/glibc-2.14
    # make –j4
    # make install
    如果make install报错: Can't open configuration file /opt/glibc-2.14/etc/ld.so.conf: No such file or directory
    解决办法:在make install 前输入,touch /opt/glibc-2.14/etc/ld.so.conf,再make install
    注意账户权限,需在opt/glibc-2.14目录下新建文件夹
    执行完之后查看:strings /opt/glibc-2.14/lib/libc.so.6 |grep GLIBC
    下面3种方法的任何一种均可
    1. export LD_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH
    2. /opt/glibc-2.14/lib/libc.so.6 拷贝并重命名为/lib64/libc.so.6
    3. 在makefile 编译的最后加上: /opt/glibc-2.14/lib/libc.so.6
    ---有时可能存在不兼容,这种编译还是存在一定的风险

    4 在oracle网站查到说是版本对应问题
    https://community.oracle.com/thread/3635853
    由于是centos 7.3,oracle版本是官网下载的11.2.0.1,这里提示说需要换到11.2.0.3 or higher
    最后上传11.2.0.4版本,安装没有报错,成功。

  • 相关阅读:
    单例模式的double check写法中的volatile关键字
    java开发中避免NullPointerException
    java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
    linux环境工作记录
    常用Java开发者工具
    compile once,run anywhere
    Java 线程
    常用的git命令
    oracle 随笔
    常用px,pt,em换算表
  • 原文地址:https://www.cnblogs.com/yhq1314/p/10830300.html
Copyright © 2020-2023  润新知