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 ...
随机推荐
- activity-intent-startActivity-startActivityResult
一. Intent和startActivity 1.在一个Activtiy中可以使用startActivity()去开始另一个制定的Activity 但在android3.0(是针对平板出的产品)之后 ...
- CCProgressTimer用法
bool HelloWorld::init(){ if ( !CCLayerColor::initWithColor(ccc4(255, 255, 2555, 255))){ return false ...
- 【转】学习Flex ActionScript 3.0 强烈推荐电子书
学习Flex ActionScript 3.0 强烈推荐电子书 AdvancED ActionScript 3.0 Animation(<Make things move>姐妹篇,强烈推 ...
- JDK8新特性之接口
在JDK7及以前的版本中,接口中都是抽象方法,不能定义方法体,但是从jdk8开始,接口中可以定义静态的非抽象的方法,直接使用接口名调用静态方法,但是它的实现类的类名或者实例却不可以调用接口中的静态方法 ...
- Razor的理解
[原创]Razor非常智能非常实用,不了解的人可能会觉得有没有都无所谓,其实不然,起初对Razor不是太了解,现在想想Razor就是来标示出C#语法的,但是HTML和C#混合输出时到底@这个小老鼠到底 ...
- html 之前学习响应式的笔记
响应式的设计,根据用户设备的不同,用户屏幕大小不同,提供不同的网页设计http://mediaqueri.es/PhoneGap 使用2,如何模拟手机设备chome 浏览器 在32以上设备检测用 de ...
- android studio 无法在可视化页面预览布局文件
Rendering Problems the following classes could not be found:android.support.v7.internal.widget.Actio ...
- 单引号、双引号 Html转义符 ----2014年12月2日
'----单引号 "-----双引号 在一个网页中的按钮,写onclick事件的处理代码,不小心写成如下: <input value="Test" ...
- cocos2dx入门分析 hello world
打开新建的"findmistress"项目,可以看到项目文件是由多个代码文件及文件夹组成的,其中 Hello World 的代码文件直接存放于该项目文件夹中.下面我们来详细介绍一下 ...
- SSH整合笔记
SSH:spring+struts+hibernate. 一:所需jar: 需要注意的是: hibernate+spring需要Spring-orm-xxx.jar struts+spring需要st ...