R和Python交互使用中出现/usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found

/usr/lib/libstdc++.so.6: version `CXXABI_1.3.9’ not found

1.升级操作

在R和python实现交互的时候,配置hive的数据读取后,进行了升级操作

yum -y install gcc gcc-c++ cyrus-sasl-devel cyrus-sasl-plain

2.查看错误

运行部分的python程序脚本时,出现了错误

Error in py_run_file_impl(file, local, convert) : 
  ImportError: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /opt/anaconda3/lib/python3.5/site-packages/google/protobuf/pyext/_message.cpython-35m-x86_64-linux-gnu.so)

3.解决问题

于是我查找/libstdc++.so.6: version `CXXABI_1.3.9文件,并进入路径进行查找

[root@nhost21 jhapp]# find / -name "libstdc++.so.*"
/opt/anaconda3/envs/python36/lib/libstdc++.so.6.0.25
/opt/anaconda3/envs/python36/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/opt/anaconda3/envs/python36/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25

发现系统中的版本好还有大于libstdc++.so.6的,因此,需要对该路径下的包进行配置

(1)复制高版本的libstdc
cp/opt/anaconda3/envs/python36/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25   /usr/lib64/
(2)进入lib64路径建立软连接
cd /usr/lib64
rm -rf libstdc++.so.6
ln -s libstdc++.so.6.0.25 libstdc++.so.6
(3)查看原先的链接
strings /usr/lib/libstdc++.so.6 | grep 'CXXABI'
[root@nhost21 lib]# strings /usr/lib64/libstdc++.so.6 | grep 'CXXABI'
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_1.3.9
CXXABI_1.3.10
CXXABI_1.3.11
CXXABI_TM_1

确定更新的连接是否到新的动态库中,存在则说明成功。

你可能感兴趣的:(笔记,Linux学习,数据分析)