version `GLIBCXX_3.4.22‘ not found

安装完paddlenlp导包时候报错如下:

>>> from paddlenlp import Taskflow
Error: Can not import avx core while this file exists: /home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddlenlp/__init__.py", line 24, in <module>
    from . import data
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddlenlp/data/__init__.py", line 15, in <module>
    from .collate import *
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddlenlp/data/collate.py", line 17, in <module>
    import paddle
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.py", line 298, in <module>
    raise e
  File "/home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.py", line 256, in <module>
    from . import core_avx
ImportError: /home/user/software/opt/gcc-5.4.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /home/user/anaconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core_avx.so)

提示`GLIBCXX_3.4.22' not found,也就是说缺少该版本,需要升级安装。

首先查看现有的版本:

strings /you_path/libstdc++.so | grep GLIBCX

上面命令填写自己的路径,比如我这里的就是:

strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX

结果如下:

 可以看到最新的只有3.4.21,所以需要安装升级新版本

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值