libstdc++-libc6.1-1.so.2 找不到的问题(转载)

原地址:http://agile-boy.javaeye.com/blog/65261

进来,因为工作需要,要在j2se1.3.1下边运行一些程序(在我看来,是多么古老的版本了),于是从sun下载j2se1.3,安装完毕.结果运行出错: /usr/jdk1.3.1_17/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory.
原来是缺少动态库,简单于是google相关的debian下的package,原来在libstdc++2.9-glibc2.1包里,apt-get 安装,却是找不到,于是apt-cache search libstdc++,发现最早的也是libstdc++2.10-glibc2.2了,安装了.
因为java需要libstdc++-libc6.1-1.so.2动态库,于是在linux下边做了个ln:ln -s /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2
结果当然是,搞定:)

=====================================

cd /usr/lib

ln -s libstdc++-libc6.2-2.so.3 libstdc++-libc6.1-1.so.2


以上方法,经过本人测试可以完成,本人虚拟机vmware8.0.3,oracle linux 6.2安装 oracle9204时候,报错,即:
[oracle@ora20120912 Disk1]$ ./runInstaller
[oracle@ora20120912 Disk1]$ Initializing Java Virtual Machine from /tmp/OraInstall2012-09-12_04-48-14PM/jre/bin/java. Please wait...
/tmp/OraInstall2012-09-12_04-48-14PM/jre/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

经过以上做后,可以实现无错误。
在etc/lib目录下存在另外的动态库。
# ls libstdc++-libc6.2-2.so.3
libstdc++-libc6.2-2.so.3下存在一个高版本的。故执行ln命令可以达到该目的。无需另找libstdc++-libc6.1-1.so.2。
以后可以如下策略:
找到/etc/lib目录下,存在的libstdc++动态库,然后做ln链接。


ln是linux中又一个非常重要命令,它的功能是为某一个文件在另外一个位置建立一个同不的链接,这个命令最常用的参数是-s,具体用法是:ln –s 源文件 目标文件。
(出处:http://www.cnblogs.com/joeblackzqq/archive/2011/03/20/1989625.html)
http://hi.baidu.com/piaohong/item/c401b1ef51c7be0c64db0006.感谢原作者。嘿嘿。
[dragon@localhost ~]$ yum search VirtualBox ky-updates 43 MB/s | 1.3 MB 00:00 Kylin Linux Advanced Server 10 - Os 699 kB/s | 11 MB 00:16 Kylin Linux Advanced Server 10 - Updates 9.7 MB/s | 36 MB 00:03 VirtualBox Repository 19 kB/s | 38 kB 00:02 ==================== Name & Summary Matched: VirtualBox ===================== VirtualBox-7.1.x86_64 : Oracle VirtualBox VirtualBox-7.2.x86_64 : Oracle VirtualBox [dragon@localhost ~]$ sudo yum install -y VirtualBox-7.2.x86_64 VirtualBox Repository 153 kB/s | 38 kB 00:00 Error: Problem: cannot install the best candidate for the job - nothing provides libQt6Help.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.29)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libm.so.6(GLIBC_2.29)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Gui.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6PrintSupport.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.32)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Core.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Xml.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Core.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6StateMachine.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Widgets.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Help.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libm.so.6(GLIBC_2.38)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6DBus.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Xml.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libc.so.6(GLIBC_2.38)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.26)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libvpx.so.9()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Widgets.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6PrintSupport.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6DBus.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Core.so.6(Qt_6.8)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6Gui.so.6()(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libstdc++.so.6(CXXABI_1.3.15)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libQt6StateMachine.so.6(Qt_6)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.30)(64bit) needed by VirtualBox-7.2-7.2.4_170995_el10-1.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) [dragon@localhost ~]$ sudo yum install -y VirtualBox-7.1.x86_64 Last metadata expiration check: 0:00:10 ago on 2025年11月03日 星期一 19时03分31. Error: Problem: cannot install the best candidate for the job - nothing provides libQt6Core.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Core.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Core.so.6(Qt_6.8)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6DBus.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6DBus.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Gui.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Gui.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Help.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Help.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6PrintSupport.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6PrintSupport.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6StateMachine.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6StateMachine.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Widgets.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Widgets.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Xml.so.6()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libQt6Xml.so.6(Qt_6)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libc.so.6(GLIBC_2.38)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libm.so.6(GLIBC_2.29)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libm.so.6(GLIBC_2.38)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libstdc++.so.6(CXXABI_1.3.15)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.26)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.29)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.30)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libstdc++.so.6(GLIBCXX_3.4.32)(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 - nothing provides libvpx.so.9()(64bit) needed by VirtualBox-7.1-7.1.14_170994_el10-1.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) [dragon@localhost ~]$ 这是说明不能安装virtubox7.*版本吗
最新发布
11-04
[root@VM-16-7-centos UnblockNeteaseMusic]# curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash - # 选v20 LTS版 2025-05-14 13:45:45 - Cleaning up old repositories... 2025-05-14 13:45:45 - Old repositories removed 2025-05-14 13:45:45 - Supported architecture: x86_64 2025-05-14 13:45:45 - Added N|Solid repository for LTS version: 20.x 2025-05-14 13:45:45 - yum available, updating... 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile nodesource-nodejs | 3.0 kB 00:00:00 (1/3): nodesource-nodejs/primary_db | 57 kB 00:00:01 (2/3): nodesource-nodejs/filelists_db | 615 kB 00:00:02 (3/3): nodesource-nodejs/other_db | 7.7 kB 00:00:00 元数据缓存已建立 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile nodesource-nsolid | 3.0 kB 00:00:00 (1/3): nodesource-nsolid/primary_db | 28 kB 00:00:00 (2/3): nodesource-nsolid/other_db | 2.7 kB 00:00:00 (3/3): nodesource-nsolid/filelists_db | 514 kB 00:00:02 元数据缓存已建立 2025-05-14 13:45:53 - Repository is configured and updated. 2025-05-14 13:45:53 - You can use N|solid Runtime as a node.js alternative 2025-05-14 13:45:53 - Run 'yum install nsolid -y' to complete the installation. 2025-05-14 13:45:53 - Run 'yum install nodejs -y' to complete the installation. [root@VM-16-7-centos UnblockNeteaseMusic]# sudo yum clean all && sudo yum install -y nodejs 已加载插件:fastestmirror, langpacks 正在清理软件源: epel extras nodesource-nodejs nodesource-nsolid os updates Cleaning up list of fastest mirrors 已加载插件:fastestmirror, langpacks Determining fastest mirrors epel | 4.3 kB 00:00:00 extras | 2.9 kB 00:00:00 nodesource-nodejs | 3.0 kB 00:00:00 nodesource-nsolid | 3.0 kB 00:00:00 os | 3.6 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/9): epel/7/x86_64/group | 399 kB 00:00:00 (2/9): epel/7/x86_64/updateinfo | 1.0 MB 00:00:00 (3/9): epel/7/x86_64/primary_db | 8.7 MB 00:00:00 (4/9): os/x86_64/group_gz | 153 kB 00:00:00 (5/9): extras/x86_64/primary_db | 253 kB 00:00:00 (6/9): nodesource-nodejs/primary_db | 57 kB 00:00:00 (7/9): updates/x86_64/primary_db | 27 MB 00:00:00 (8/9): os/x86_64/primary_db | 6.1 MB 00:00:01 (9/9): nodesource-nsolid/primary_db | 28 kB 00:00:01 正在解决依赖关系 There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help). --> 正在检查事务 ---> 软件包 nodejs.x86_64.1.16.20.2-1.el7 将被 升级 ---> 软件包 nodejs.x86_64.2.20.19.1-1nodesource 将被 更新 --> 正在处理依赖关系 glibc >= 2.28,它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libm.so.6(GLIBC_2.27)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libstdc++.so.6(CXXABI_1.3.9)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.20)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libstdc++.so.6(GLIBCXX_3.4.21)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 正在处理依赖关系 libc.so.6(GLIBC_2.28)(64bit),它被软件包 2:nodejs-20.19.1-1nodesource.x86_64 需要 --> 解决依赖关系完成 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libstdc++.so.6(GLIBCXX_3.4.20)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:glibc >= 2.28 已安装: glibc-2.17-326.el7_9.3.x86_64 (@updates) glibc = 2.17-326.el7_9.3 可用: glibc-2.17-317.el7.i686 (os) glibc = 2.17-317.el7 可用: glibc-2.17-322.el7_9.i686 (updates) glibc = 2.17-322.el7_9 可用: glibc-2.17-323.el7_9.i686 (updates) glibc = 2.17-323.el7_9 可用: glibc-2.17-324.el7_9.i686 (updates) glibc = 2.17-324.el7_9 可用: glibc-2.17-325.el7_9.i686 (updates) glibc = 2.17-325.el7_9 可用: glibc-2.17-326.el7_9.i686 (updates) glibc = 2.17-326.el7_9 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libm.so.6(GLIBC_2.27)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libstdc++.so.6(CXXABI_1.3.9)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libc.so.6(GLIBC_2.28)(64bit) 错误:软件包:2:nodejs-20.19.1-1nodesource.x86_64 (nodesource-nodejs) 需要:libstdc++.so.6(GLIBCXX_3.4.21)(64bit) 您可以尝试添加 --skip-broken 选项来解决该问题 ** 发现 1 个已存在的 RPM 数据库问题, 'yum check' 输出如下: mpi-selector-1.0.3-1.54310.x86_64 是 mpi-selector-1.0.3-1.51258.x86_64 的副本 [root@VM-16-7-centos UnblockNeteaseMusic]# node -v # 验证版本应≥v20.12.2 v16.20.2 [root@VM-16-7-centos UnblockNeteaseMusic]# # CentOS证书默认路径 [root@VM-16-7-centos UnblockNeteaseMusic]# export NODE_EXTRA_CA_CERTS=/etc/pki/tls/certs/ca-bundle.crt [root@VM-16-7-centos UnblockNeteaseMusic]# # 永久生效则写入~/.bashrc [root@VM-16-7-centos UnblockNeteaseMusic]# echo 'export NODE_EXTRA_CA_CERTS=/etc/pki/tls/certs/ca-bundle.crt' >> ~/.bashrc [root@VM-16-7-centos UnblockNeteaseMusic]# npm install --verbose fuse.js # 观察下载源是否为npmmirror.com -bash: npm: 未到命令 [root@VM-16-7-centos UnblockNeteaseMusic]# curl -I https://registry.npmmirror.com # 检查返回200状态码
05-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值