2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > 任何类似问题 libstdc++.so.6: version `GLIBCXX_3.4.26’ not found 的一个通用解决方法

任何类似问题 libstdc++.so.6: version `GLIBCXX_3.4.26’ not found 的一个通用解决方法

时间:2022-11-07 21:19:04

相关推荐

任何类似问题 libstdc++.so.6: version `GLIBCXX_3.4.26’ not found 的一个通用解决方法

libstdc++.so.6: version `GLIBCXX_3.4.26’ not found

首先我们可以吧libstdc++啥的看成一个库,然后代码可能运行时候报错说这个库没找到或者这个库里面版本没找到。那就是要更新了。当然常规更新方法可以但是如果更新不行不妨试试这个方法

先用

locate libstdc++.so.6 找出这个库的不同版本,因为通常这个库随着系统升级,conda等多个位置存在高级版本 libstdc++.so.6.3.30、 libstdc++.so.6.4.30等。

以该报错信息微为例子

Traceback (most recent call last):File "/home/xxy/anaconda3/envs/GWA/bin/mamba", line 7, in <module>from mamba.mamba import mainFile "/home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/mamba/mamba.py", line 49, in <module>import libmambapy as apiFile "/home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/__init__.py", line 7, in <module>raise eFile "/home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/__init__.py", line 4, in <module>from libmambapy.bindings import * # noqa: F401,F403ImportError: /home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/../../../libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-x86_64-linux-gnu.so)

#先locate libstdc++.so.6 得到不同的版本,找最新的版本然后去查看这个版本存不存在你需要的报错的内容# libstdc++.so.6: version `GLIBCXX_3.4.26’ not foundlocate libstdc++.so.6/usr/local/anaconda3/pkgs/libgcc-4.8.5-2/lib/libstdc++.so.6.0.19/usr/local/anaconda3/pkgs/libgcc-7.2.0-h69d50b8_2/lib/libstdc++.so.6.0.21/usr/local/anaconda3/pkgs/libstdcxx-ng-12.1.0-ha89aaad_16/lib/libstdc++.so.6/usr/local/anaconda3/pkgs/libstdcxx-ng-12.1.0-ha89aaad_16/lib/libstdc++.so.6.0.30/usr/local/lib64/libstdc++.so.6/usr/local/lib64/libstdc++.so.6.0.24/usr/local/lib64/libstdc++.so.6.0.24-gdb.py/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.py/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.pyc/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.19-gdb.pyo/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc# 看一下找到的最高版本有没有GLIBCXX_3.4.26strings /usr/local/anaconda3/lib/libstdc++.so.6.0.30|grep GLIBCGLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBCXX_3.4.18GLIBCXX_3.4.19GLIBCXX_3.4.20GLIBCXX_3.4.21GLIBCXX_3.4.22GLIBCXX_3.4.23GLIBCXX_3.4.24GLIBCXX_3.4.25GLIBCXX_3.4.26GLIBCXX_3.4.27GLIBCXX_3.4.28GLIBCXX_3.4.29GLIBCXX_3.4.30GLIBC_2.2.5GLIBC_2.3GLIBC_2.6GLIBC_2.4GLIBC_2.3.2# 可以看见一直到3.4.30都有# 那直接创建软连接到目标文件夹就可以了 创建软连接要删除原文件# 根据 ImportError: /home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/../../../libstdc++.so.6: version `GLIBCXX_3.4.26' not found #(required by /home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/bindings.cpython-310-x86_64-linux-gnu.so)rm /home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/../../../libstdc++.so.6# 然后软连接一个新的ln -s /usr/local/anaconda3/lib/libstdc++.so.6.0.30 /home/xxy/anaconda3/envs/GWA/lib/python3.10/site-packages/libmambapy/../../../libstdc++.so.6# 测试下mambausage: mamba [-h] [-V] command ...conda is a tool for managing and deploying applications, environments and packages.Options:positional arguments:commandclean Remove unused packages and pareCompare packages between conda environments.config Modify configuration values in .condarc. This is modeled after the git config command. Writes to theuser .condarc file (/home/xxy/.condarc) by default. Use the --show-sources flag to display allidentified configuration locations on your computer.create Create a new conda environment from a list of specified packages.info Display information about current conda install.init Initialize conda for shell interaction.installInstalls a list of packages into a specified conda environment.list List installed packages in a conda environment.packageLow-level conda package utility. (EXPERIMENTAL)remove Remove a list of packages from a specified conda environment.rename Renames an existing environment.runRun an executable in a conda environment.search Search for packages and display associated information.The input is a MatchSpec, a query language forconda packages. See examples below.uninstall Alias for conda remove.update Updates conda packages to the latest compatible version.upgradeAlias for conda update.noticesRetrieves latest channel notifications.repoquery Query repositories using mamba.options:-h, --helpShow this help message and exit.-V, --version Show the conda version number and exit.conda commands available from other packages:env(GWA) [xxy@localhost xxy]$ mambausage: mamba [-h] [-V] command ...conda is a tool for managing and deploying applications, environments and packages.Options:positional arguments:commandclean Remove unused packages and pareCompare packages between conda environments.config Modify configuration values in .condarc. This is modeled after the git config command. Writes to theuser .condarc file (/home/xxy/.condarc) by default. Use the --show-sources flag to display allidentified configuration locations on your computer.create Create a new conda environment from a list of specified packages.info Display information about current conda install.init Initialize conda for shell interaction.installInstalls a list of packages into a specified conda environment.list List installed packages in a conda environment.packageLow-level conda package utility. (EXPERIMENTAL)remove Remove a list of packages from a specified conda environment.rename Renames an existing environment.runRun an executable in a conda environment.search Search for packages and display associated information.The input is a MatchSpec, a query language forconda packages. See examples below.uninstall Alias for conda remove.update Updates conda packages to the latest compatible version.upgradeAlias for conda update.noticesRetrieves latest channel notifications.repoquery Query repositories using mamba.options:-h, --helpShow this help message and exit.-V, --version Show the conda version number and exit.conda commands available from other packages:env

问题就解决了,通常有很多库不存在啥的问题,都可以使用该方法,去找它的同文件版本或升级版本去创建软连接。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。