博客园  :: 首页  :: 管理

在SAP-应用-APP-机器上执行如下命令报错

awpxxx03:prdadm 270> R3trans -d

R3trans: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by R3trans)

 

其实之前,使用过一种方法解决这个问题,可以参考笔者另一篇文章

《关于Redhat-Linux中-compat-sap-c++的说明与GLIBCXX_3.4.26 not found报错的解决方法》

但是后来发现、每次系统升级重启、或者安装软件(笔者测试的sos软件包-sosreport命令)都会导致软连接还原成系统默认的

 

根原因-Root Cause:

The base install of RHEL 8 does not provide such a new libstdc++ ABI.

Usually, such an application would be considered not compatible with RHEL 8 and need to be run under a newer RHEL such as RHEL 9.

However, specifically for SAP, there is an additional compatibility package provided.

 

解决方法-Resolution

[root@awpxxx03 qq-5201351]# subscription-manager repos --enable rhel-8-for-x86_64-sap-solutions-rpms
[root@awpxxx03 qq-5201351]# yum install compat-sap-c++-12

Create a library path for SAP and symlink the new library into it:

mkdir -p /usr/sap/lib
ln -s /opt/rh/SAP/lib64/compat-sap-c++-12.so /usr/sap/lib/libstdc++.so.6

Note: Do not symlink or replace the system-wide C++ standard library at /lib64/libstdc++.6.so!

Ensure the new library path has correct permissions for the installation's System Identifier (SID):

chown -R SIDadm:sapsys /usr/sap/lib

Start the SAP application.

注:这里的 SIDadm,需要修改成自己实际情况中的用户名称

The compat-sap-c++ packages should not be used as a replacement for RHEL's C++ standard library at /lib64/libstdc++.6.so.

Using any compat-sap-c++ packages to run other non-SAP software is not supported by Red Hat.

 

其他补充的操作:将之前的临时解决方法,还原回去(根据实际情况进行命令的)

cd /lib64
ln -sf libstdc++.so.6.0.25 /lib64/libstdc++.so.6

 

最后再次检查验证,结果输出正常  -(笔者测试发现,整个过程不需要重启SAP)

awpxxx03:prdadm 271> R3trans -d
This is R3trans version 6.26 (release 754 - 12.05.23 - 16:07:06).
unicode enabled version
R3trans finished (0000).
awpxxx03:prdadm 272>

 

 

 

尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/18051859