中文分词一般会选择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. mysql的优化措施,从sql优化做起

    http://geeksblog.cc/2016/06/11/mysql-optimize/ 优化sql的一般步骤 通过show status了解各种sql的执行频率 定位执行效率低的sql语句 通过 ...

  2. maven 学习1 -安装maven 并执行编译命令

    一.maven 下载与安装(安装好jdk的前提下) 1.下载地址:http://maven.apache.org/download.cgi  (选择最新的zip版本),下载完毕后解压 2.安装:系统p ...

  3. Windows2012中Python2.7.11+Python3.4.4+Pycharm

    下载软件包 Python2.7.11:  https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi Python3.4.4:   ...

  4. springMvc中406错误解决,springMvc使用json出现406 (Not Acceptable)

    springMvc中406错误解决, springMvc使用json出现406 (Not Acceptable) >>>>>>>>>>> ...

  5. tp集成支付宝担保支付

    现在的网站功能越来越全乎了,很多网站都需要做支付功能,而且很多大平台都提供了各式各样的api来扩充自己的用户和开发者.话说,这种使用大平台的api来做支付,无论是从成本上还是从开发效率上都是很好的选择 ...

  6. Lucene.net项目研究说明

    最近项目需要全文检索,所以找了几个开源的.NET检索项目,如:Lucene.net,Sphinx,Hubble.net.最后选择使用Lucene.ne来实现全文检索.至于原因嘛,可以参考下面几点: 1 ...

  7. 一个少了context的赋值的错误

    错误类型如下,怎么也找不到错误,后来仔细看了源代码,原来忘了context的赋值,只是声明,声明后不马上引用到值容易出事. 11-12 15:00:09.877: E/AndroidRuntime(6 ...

  8. Javascript基础学习(3)_对象和数组

    一.对象是一种无序的属性集合,每个属性都有自己的名字和值. 1.创建对象 花括号内逗号分隔 var person = { "Name" : "LiCheng", ...

  9. 浅谈.net中的params关键字

    先举个例子: 代码如下: class Program { static void Main(string[] args) { Console.WriteLine(Sum(1)); Console.Wr ...

  10. hibernate使用sql语句查询实体时,要写上addEntity

    abDAO.getSession().createSQLQuery(hql).addEntity(对象.class).list(); 参考http://blog.csdn.net/vacblog/ar ...