./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)怎么处理


这个错误信息表明你的系统中 `.net` 执行需要的 `libstdc++.so.6` 版本(具体是 glibcxx_3.4.21 版本)没有找到或者版本过低。 以下是几个可能的解决方法: 1. 更新你的 `libstdc++` 库到最新版本。你可以通过安装 `libstdc++` 的开发包来达到这个目的,因为开发包通常包含库文件。例如,在基于 Debian 的系统上,你可以运行下面的命令: ``` sudo apt-get update sudo apt-get install libstdc++6 ``` 对于红帽企业版Linux (RHEL) 或者 CentOS, 你可以尝试: ``` sudo yum update sudo yum install libstdc++-devel ``` 2. 如果你已经安装了 `libstdc++` 的最新版本,但仍然遇到问题,那可能是因为 `dotnet` 还是在查找旧版本的 `libstdc++`。这时你可以使用 `ldd` 命令查看 `dotnet` 程序实际链接的是哪个版本的 `libstdc++`。 ``` ldd ./dotnet | grep libstdc++ ``` 根据输出的结果,你可以选择移动或者软链接正确的 `libstdc++` 到预期位置。 3. 如果你的系统不允许你更新某些库文件,你可以考虑使用 rpath 或者环境变量 `LD_LIBRARY_PATH` 来指定新的库文件的位置。将新版本的 `libstdc++` 放在一个特定的目录中,并添加该目录到 `LD_LIBRARY_PATH` 中。 ``` export LD_LIBRARY_PATH=/path/to/new/library:$LD_LIBRARY_PATH ``` 使用这种方法可能会引入其他的问题,因为它会影响到所有依赖于 `libstdc++` 的程序,所以请谨慎操作。 4. 如果这些都不能解决问题,可以考虑从源码重新编译安装 `.NET` SDK,这样可以在编译时指定它使用正确的 `libstdc++` 版本。不过这通常是一个比较复杂的过程,需要一定的 Linux 和编译知识。 以上步骤应该能够帮助你解决这个问题。如果问题依旧存在,请提供更多的信息以便进一步排查。 [2024-08-30 10:24:50 | AI写代码神器 | 485点数解答]
- /usr/share/dotnet/dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by /usr/share/dotnet/dotnet)(307点数解答 | 2024-08-30 10:35:07)182
- ./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)(208点数解答 | 2024-08-30 10:24:18)151
- ./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)(670点数解答 | 2024-08-30 10:24:47)200
- ./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)怎么处理(485点数解答 | 2024-08-30 10:24:50)320
- /usr/sbin/vsftpd: relocation error: /lib64/libnss_files.so.2: symbol __libc_readline_unlocked, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference 密码长度:8位(149点数解答 | 2025-01-20 11:15:28)140
- // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture(45点数解答 | 2024-12-14 17:33:30)145
- // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture(356点数解答 | 2024-12-14 17:34:20)180
- // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture(111点数解答 | 2024-12-14 17:34:20)197
- // __multiversion__ // this signals the loading code to prepend either #version 100 or #version 300 es as apropriate. // to use centroid sampling we need to have version 300 es shaders, which requires changing: // attribute to in // varying to out when in vertex shaders or in when in fragment shaders // defining an out vec4 fragcolor and replacing uses of gl_fragcolor with fragcolor // texture2d to texture #if __version__ >= 300 // version 300 code #define varying in #define texture2d texture(910点数解答 | 2024-12-14 17:37:32)209
- 水仙花数的定义:一个三位数(100~999)的各位数的立方和等于它本身。例如,153是一个三位数的水仙花数,因为 1^3 + 5^3+ 3^3 =1 + 125 + 27=153 题目大意:输入一个数n,求100到整数n的区间内有多少个水仙花数m,并打印水仙花数的数量m,用空格分隔。若区间没有水仙花数,则输出not found. 输入描述: 输入一个整数n 输出描述: 水仙花数的数量m ,(找不到打印not found) 示例1:输入 :154 输出 : 1 示例2:输入 101 输出 :not found(161点数解答 | 2024-10-18 18:05:29)227
- java 水仙花数的定义:一个三位数(100~999)的各位数的立方和等于它本身。例如,153是一个三位数的水仙花数,因为 1^3 + 5^3+ 3^3 =1 + 125 + 27=153 题目大意:输入一个数n,求100到整数n的区间内有多少个水仙花数m,并打印水仙花数的数量m,用空格分隔。若区间没有水仙花数,则输出not found. 输入描述: 输入一个整数n 输出描述: 水仙花数的数量m ,(找不到打印not found) 示例1:输入 :154 输出 : 1 示例2:输入 101 输出 :not found(209点数解答 | 2024-10-18 18:05:55)201
- w tensorflow/stream_executor/platform/default/dso_loader.cc:64] could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: no such file or directory 2024-03-01 14:19:13.225439: i tensorflow/stream_executor/cuda/cudart_stub.cc:29] ignore above cudart dlerror if you do not have a gpu set up on your machine.(337点数解答 | 2024-03-01 14:20:05)291