./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)
The error message you're encountering suggests that the version of `libstdc++.so.6` required by `./dotnet` is not available on your system. Specifically, it's looking for the `glibcxx_3.4.21` version. Here’s how you can resolve this issue: 1. Update Your System First, ensure that your system is up-to-date. This might include updating packages and libraries. ```bash sudo apt update sudo apt upgrade ``` 2. Install the Required Libraries If the above steps don't help, you may need to install the specific version of `libstdc++`. You can do this by installing the `libstdc++6` package. ```bash sudo apt install libstdc++6 ``` 3. Verify the Installed Version After installation, verify the installed version of `libstdc++`. ```bash ldd ./dotnet | grep libstdc++ ``` This will show you which version of `libstdc++` is being used by `./dotnet`. 4. Install Development Libraries Sometimes, you might need the development libraries as well. ```bash sudo apt install libstdc++-7-dev ``` Replace `7` with the appropriate version number if necessary. 5. Symbolic Linking If the library version is still not compatible, you might need to create a symbolic link to point to the correct library version. Find the path of the correct library version: ```bash locate libstdc++.so.6 ``` Then create a symbolic link: ```bash sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ``` Replace `/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25` with the actual path of the correct version. 6. Reinstall .NET SDK As a last resort, you can try reinstalling the .NET SDK. Uninstall the current .NET SDK: ```bash sudo rm -rf /usr/share/dotnet sudo rm /usr/bin/dotnet ``` Download and install the latest .NET SDK: ```bash wget https://download.visualstudio.microsoft.com/download/pr/38979f5c-52b8-46a6-b65f-488772d59e3c/89550532b465661b595b355d3083007f/runtime-7.0.0.tar.gz tar -xzf runtime-7.0.0.tar.gz sudo mv dotnet /usr/share sudo ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet ``` Replace the URL and tarball name with the latest release from the .NET website. By following these steps, you should be able to resolve the `glibcxx_3.4.21` not found error. [2024-08-30 10:24:47 | AI写代码神器 | 670点数解答]
- [讯飞星火] /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)197
- [字节豆包] ./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)(208点数解答 | 2024-08-30 10:24:18)164
- [阿里通义] ./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)(670点数解答 | 2024-08-30 10:24:47)214
- [阿里通义] ./dotnet: /lib64/libstdc++.so.6: version `glibcxx_3.4.21' not found (required by ./dotnet)怎么处理(485点数解答 | 2024-08-30 10:24:50)338
- [阿里通义] /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)155
- [字节豆包] 7-8 查找整数 分数 7 作者 杨起帆 单位 浙大城市学院 本题要求从输入的N个整数中查找给定的X。如果找到,输出X的位置(从0开始数);如果没有找到,输出“Not Found”。 输入格式: 输入在第一行中给出两个正整数N(≤20)和X,第二行给出N个整数。数字均不超过长整型,其间以空格分隔。 输出格式: 在一行中输出X的位置,或者“Not Found”。 输入样例1: 5 7 3 5 7 1 9 输出样例1: 2 输入样例2: 5 7 3 5 8 1 9 输出样例2: Not Found 用C语言写(205点数解答 | 2025-11-28 00:04:50)10
- [字节豆包] // __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)169
- [阿里通义] // __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)202
- [讯飞星火] // __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)236
- [百度文心] // __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)231
- [字节豆包] 7-8 查找整数 分数 7 作者 杨起帆 单位 浙大城市学院 本题要求从输入的N个整数中查找给定的X。如果找到,输出X的位置(从0开始数);如果没有找到,输出“Not Found”。 输入格式: 输入在第一行中给出两个正整数N(≤20)和X,第二行给出N个整数。数字均不超过长整型,其间以空格分隔。 输出格式: 在一行中输出X的位置,或者“Not Found”。 输入样例1: 5 7 3 5 7 1 9 输出样例1: 2 输入样例2: 5 7 3 5 8 1 9 输出样例2: Not Found用C语言写(204点数解答 | 2025-11-28 00:13:01)17
- [字节豆包] 水仙花数的定义:一个三位数(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)247