libstdc++.so.5: cannot open shared object file: No such file or directory
中文分词一般会选择ICTCLAS的模块,虽然不能说很完美,但也算是一个不错的选择。
它提供了windows版本和linux版本,并支持C/C#/JNI接口。这本来是一个不错的事情,但版本一多,官方似乎就有点维护不过来了。
在linux下调用它的.so文件后,它会报错如下:
|
1
2
|
Exception in thread "main" java.lang.UnsatisfiedLinkError: /..../libICTCLAS50.so: libstdc++.so.5: cannot open shared object file: No such file or directory |
这个错误原因很简单,版本不对,ICTCLAS使用的c++ lib库落后了自己正常使用的stdc++ lib太远了,导致兼容不能。为此我们需要专门为它下载个过去的版本。
fedora这个distribution可以让事情变得比较简单。
libstdc++.so.5 是compat-libstdc++-33 package下的一部分,从这个地址可以找到一些mirror,随便选择一个,下载rpm包,安装即可。
当然,yum可以更容易解决这个问题:
|
1
|
# yum install compat-libstdc++-33 |
注意,stackoverflow的这个问答中,有人建议使用这个命令
|
1
|
# yum install 'libstdc++.so.5' |
这种手法在某些时候也许是可用的,在i386,i686的系统下也是可以的,但是在x64环境下其实是不能用的。
因为它会找到个compat-libstdc++-33.i686,然后安装。效果就是lib/中出现了需要的.so,但在更重要的lib64/中却并没有安装到。
如果是其他版本,应该也可以从软件仓库中找到一些可用的安装包。
如果实在不行。自求多福吧。。libstdc++.so.5是gcc 3.3版本附赠的一个东西,所以你可能需要试试gcc 3是怎么编译的。
提供一个下载的源: http://packages.debian.org/stable/base/libstdc++5
下载那个.tar.gz包,慢慢编译吧
当然,应该还有更好的方法,虽然我不知道。
Ubuntu系统解决该问题:
新装的Ubuntu中使用一些程序出现:libstdc++.so.5: cannot open shared object file: No such file or directory
sudo apt-get install libstdc++5 末果,说找不到这个包,但是有 libstdc++6
那么选择手动安装:
1. 下载安装包: wget -c http://lug.mtu.edu/ubuntu/pool/main/g/gcc-3.3/libstdc++5_3.3.6-10_i386.deb
2. 解包为libstdc++5: dpkg -x libstdc++5_3.3.6-10_i386.deb libstdc++5
3. 复制到系统lib目录:sudo cp libstdc++5/usr/lib/libstdc++.so.5.0.7 /usr/lib
4. 进入系统lib目录建libstdc++5链接:cd /usr/lib; sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
搞定!
如果找不到url按下列方式走:
1.下载安装包:
http://free.nchc.org.tw/ubuntu//pool/universe/g/gcc-3.3/libstdc++5_3.3.6-25ubuntu4_i386.deb
//以上的URL可能会无效,此时请到ubuntu的官方网站的packages栏目'http://packages.ubuntu.com/precise/amd64/libstdc++5/download"选择一个可用的链接来下载.deb文件。
2. 解包为libstdc++5: dpkg -x libstdc++5_3.3.6-25ubuntu1_amd64.deb libstdc++5
3. 复制到系统lib目录
cd libstdc++5/usr/lib/i386-linux-gnu
cp * /usr/lib
3.cp libstdc++5/usr/lib/libstdc++.so.5.0.7 /usr/lib
//libstdc++.so.5.0.7要替换为实际的文件名。
4. 进入系统lib目录建libstdc++5链接:cd /usr/lib; sudo ln -s libstdc++.so.5.0.7 libstdc++.so.5
libstdc++.so.5: cannot open shared object file: No such file or directory的更多相关文章
- ubuntu解决libstdc++.so.6: cannot open shared object file: No such file or directory:问题
解决libstdc++.so.6: cannot open shared object file: No such file or directory:原因在于,在13.10 版本中,ia32_lib ...
- 错误: libstdc++.so.6: cannot open shared object file: No such file or directory
解压完别人提供的openwrt代码,编译时,出现如下错误: # configuration written to .config#mips-openwrt-linux-uclibc-gcc: erro ...
- 启动MongoDB时,提示:error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
启动MongoDB时,提示: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: ...
- libstdc++.so.6: cannot open shared object file: No such file or directory
sudo apt-get install lib32stdc++6 sudo apt-get install lib32z1
- ./jad: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
Ubuntu 上使用jad,出现上面错误: ./jad: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot ...
- Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir
问题: Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared obje ...
- mysql初始化/usr/local/mysql/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
[root@test153 ~]# /usr/local/mysql/bin/mysqld --initialize --user=mysql --basedir=/usr/local/mysql - ...
- cannot open shared object file: No such file or directory解决
cannot open shared object file: No such file or directory解决 ./move_db: error while loading shared ...
- python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...
随机推荐
- [MySQL5.6] 一个简单的optimizer_trace示例
[MySQL5.6] 一个简单的optimizer_trace示例 前面已经介绍了如何使用和配置MySQL5.6中optimizer_trace(点击博客),本篇我们以一个相对简单的例子来跟踪op ...
- 以非root权限安装nginx及运行
本章主要讲如何在无root权限(包含无sudo权限)条件下于centos命令行中安装nginx以及在大于1024的端口(这里用8080)上运行. 1. 安装 两种方式,一是下载预编译好的rpm包安装, ...
- build/envsetup.sh中hmm、get_abs_build_var、get_build_var解析
function hmm() { # 打印帮助信息 cat <<EOF Invoke ". build/envsetup.sh" from your shell to ...
- Android源码编译过程之九鼎开发板
build_kernel() { # 进入源码顶层目录 cd ${BS_DIR_KERNEL} || # 编译配置文件 make ${BS_CONFIG_KERNEL} ARCH=arm CROSS_ ...
- JQuery判断子Iframe 加载完成的技术解决
当需要我们给当前页面动态创建Iframe子框架的时候,并且同时需要操作子Iframe里的方法的时候,我们发现无法成功实现.这是为什么呢?经小程总结,发现子Iframe还没有来的及加载完成,就去执行里面 ...
- ManualResetEvent的使用与介绍
它可以通知一个或多个正在等待的线程已发生事件,允许线程通过发信号互相通信,来控制线程是否可心访问资源 当一个线程开始一个活动(此活动必须完成后,其他线程才能开始)时,它调用 Reset 以将 Manu ...
- Mybatis的学习总结:mybatis的入门介绍
一.myBatis简述 MyBatis是一个支持普通SQL查询,存储过程和高级映射的优秀持久层框架.MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及对结果集的检索封装.MyBatis可以 ...
- 前端开发构建工具gulp的安装使用
曾几何时还在使用grunt作为前端的构建工具,直到有一天同事向我推荐了gulp,在这里博主将不讨论gulp与grunt各自优势的比较,只为大家介绍gulp如何安装和使用. Gulp 是用 nodejs ...
- SVM技法
PLA不管胖瘦,SVM喜欢胖的 fewer dichotomies=> small VC 演算法的VC dimension shatter 掉3个点 如果限制胖瘦,两个点都shatter不掉 喜 ...
- 输出第N个素数
输出第N个素数 public class FindNthPrime { public static void main(String[] args){ int N = Integer.parseInt ...