中文分词一般会选择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的更多相关文章

  1. 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 ...

  2. 错误: libstdc++.so.6: cannot open shared object file: No such file or directory

    解压完别人提供的openwrt代码,编译时,出现如下错误: # configuration written to .config#mips-openwrt-linux-uclibc-gcc: erro ...

  3. 启动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: ...

  4. libstdc++.so.6: cannot open shared object file: No such file or directory

    sudo apt-get install lib32stdc++6 sudo apt-get install lib32z1

  5. ./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 ...

  6. 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 ...

  7. 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 - ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. 让iOS开发变得更有效率-分类、工具类

    在工作中整理的一些分类与工具类,分享给大家.这些工具类可以减少项目中的代码量,让代码变得更简洁,可以大大的提升项目的效率,直接拖到项目中使用即可.下载地址:https://github.com/lee ...

  2. DevExpress的GridView设置特定行的样式

    GridView控件绑定事件: gridView_SampleData.CustomDrawCell += gridView_SampleData_CustomDrawCell; 根据自定义逻辑来改变 ...

  3. javascript常用方法(慢慢整理)

    获取类型:[object object],[object function],[object Undefined]等 Object.prototype.toString.apply(obj); 获取对 ...

  4. h5宣传页制作过程中遇到的问题

    音乐播放 ios下关闭不流畅; (ios下需重新image 模拟) 音乐设置自动播放属性后 部分机型下不能自动播放.目前解决方案: touchstart时触发播放 微信“分享给朋友”点击发送后,页面卡 ...

  5. burp

    http://www.2cto.com/Article/201406/310929.html

  6. jq版本更新后无live函数的处理.

    之前你的代码如果是$("#ele").live("click", function() {    //...});现在要写成$("#ele" ...

  7. Eclipse 经验之谈(一):快速打war包

    如何快速打一个war包: 具体步骤:  单击右键[在项目名称上]——>Export -->War File . 完成war包的导出了.嘻嘻

  8. 4.SQL语言基础

    4.1语言分类和用户模式 4.1.1语言分类 1)数据查询语言 用语检索数据库中的数据,主要是select语句,是操作数据库时最为频繁使用. 2)数据操纵语言 用语改变数据库中的数据,主要包括inse ...

  9. html-----003

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  10. jQuery 选择器【1】

    jQuery 选择器 请使用我们的 jQuery 选择器检测器 来演示不同的选择器. 选择器 实例 选取 * $("*") 所有元素 #id $("#lastname&q ...