I checked all previous threads, set
我检查了所有以前的线程,设置
LD_LIBRARY_PATH and followed accordingly. But still no issue.
LD_LIBRARY_PATH并相应地紧随其后。但是仍然没有问题。
I am trying to execute cherrypicker
software and executing in this way:
我正在尝试执行cherrypicker软件,并以这种方式执行:
./cherrypicker.sh input.txt
Error message :
错误信息:
/root/Desktop/karim/software/cherrypicker1.01/tools/crf++/.libs/lt-crf_test: error while loading shared libraries: libcrfpp.so.0: cannot open shared object file: No such file or directory
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.util.Vector.get(Vector.java:744)
at CreateNPSpan.<init>(CreateNPSpan.java:30)
at CreateNPSpan.main(CreateNPSpan.java:81)
creating feature file....
java.io.FileNotFoundException: input.txt.npspan (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileInputStream.<init>(FileInputStream.java:101)
at java.io.FileReader.<init>(FileReader.java:58)
at CherryPick.LoadManualEntities(CherryPick.java:111)
at CherryPick.LoadEntities(CherryPick.java:139)
at CherryPick.<init>(CherryPick.java:30)
at CherryPick.main(CherryPick.java:2188)
Exception in thread "main" java.lang.NullPointerException
at CherryPick.SortEntityMentions(CherryPick.java:171)
at CherryPick.LoadEntities(CherryPick.java:141)
at CherryPick.<init>(CherryPick.java:30)
at CherryPick.main(CherryPick.java:2188)
classifying clusters using cr joint model.....
creating output.....
Gotcha creating entities : java.lang.NumberFormatException: For input string: "no"
I checked usr/lib
but there's no such file.
我查了usr/lib,但是没有这样的文件。
In directory : cherrypicker1.01/tools/crf++/.libs
I found following files
目录:cherrypicker1.01 /工具/ crf + + /。我找到了下面的文件
crf_learn feature_index.o libcrfpp.lai lt-crf_test tagger.o
crf_test feature.o libcrfpp.o node.o
encoder.o lbfgs.o libcrfpp.so.0.0.0 param.o
feature_cache.o libcrfpp.a lt-crf_learn path.o
Any suggestion for this?
任何建议吗?
2 个解决方案
#1
2
Follow these steps
遵循以下步骤
- Go to http://taku910.github.io/crfpp/#download and download CRF++-0.58.tar.gz
- 访问http://taku910.github。io / crfpp / # CRF + + 0.58.tar.gz下载和下载
- Untar above file and do
./configure
,make install
- 卸载上面的文件。/配置,安装
- In parent directories lookup for file
sudo find ./ | grep libcrfpp.so.0
, from there you will get where the missing file is located - 在父目录中查找文件sudo查找。/ | grep libcrfp .so。从那里你将得到丢失文件所在的位置。
- copy that file to
/usr/lib
andcherrypicker1.01/tools/crf++/.libs/
- 将该文件复制到/usr/lib和cherrypicker1.01/tools/crf+ /.libs/
Now it should work
现在应该工作
#2
1
The path to which the libraries reside depends upon the value passed to --prefix
to the configure
script. If it is not passed, then according to the source code, the default path is /usr/local/
.
库驻留的路径依赖于传递到的值——前缀到configure脚本。如果没有传递,那么根据源代码,默认路径是/usr/local/。
Actually, by default /usr/local/lib
is not present the path where system searches for dynamic libraries. Hence, one can do:
实际上,默认情况下,/usr/local/lib不提供系统搜索动态库的路径。因此,一个人可以做的事:
echo "/usr/local/lib/" | sudo tee /etc/ld.so.conf.d/CRF.conf
sudo rm -f /etc/ld.so.cache
sudo ldconfig
Now, perform:
现在,执行:
ldd $(which crf_test)
The output should be something similar to:
输出应类似于:
linux-vdso.so.1 (0x00007ffefc1f0000)
libcrfpp.so.0 => /usr/local/lib/libcrfpp.so.0 (0x00007f6b715b4000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6b71398000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f6b71016000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6b70d0e000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6b70af7000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6b70737000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6b717f3000)
The CRF developers may wish to hard code /usr/local/lib/
or $PREFIX/lib
as one of the directories to search for, inside the binaries, using RPATH. To check if a binary contains RPATH, do:
CRF开发人员可能希望在二进制文件中使用RPATH将/usr/local/lib/或$前缀/lib硬编码为要搜索的目录之一。要检查二进制文件是否包含RPATH,请执行以下操作:
objdump -x $binary | grep RPATH
#1
2
Follow these steps
遵循以下步骤
- Go to http://taku910.github.io/crfpp/#download and download CRF++-0.58.tar.gz
- 访问http://taku910.github。io / crfpp / # CRF + + 0.58.tar.gz下载和下载
- Untar above file and do
./configure
,make install
- 卸载上面的文件。/配置,安装
- In parent directories lookup for file
sudo find ./ | grep libcrfpp.so.0
, from there you will get where the missing file is located - 在父目录中查找文件sudo查找。/ | grep libcrfp .so。从那里你将得到丢失文件所在的位置。
- copy that file to
/usr/lib
andcherrypicker1.01/tools/crf++/.libs/
- 将该文件复制到/usr/lib和cherrypicker1.01/tools/crf+ /.libs/
Now it should work
现在应该工作
#2
1
The path to which the libraries reside depends upon the value passed to --prefix
to the configure
script. If it is not passed, then according to the source code, the default path is /usr/local/
.
库驻留的路径依赖于传递到的值——前缀到configure脚本。如果没有传递,那么根据源代码,默认路径是/usr/local/。
Actually, by default /usr/local/lib
is not present the path where system searches for dynamic libraries. Hence, one can do:
实际上,默认情况下,/usr/local/lib不提供系统搜索动态库的路径。因此,一个人可以做的事:
echo "/usr/local/lib/" | sudo tee /etc/ld.so.conf.d/CRF.conf
sudo rm -f /etc/ld.so.cache
sudo ldconfig
Now, perform:
现在,执行:
ldd $(which crf_test)
The output should be something similar to:
输出应类似于:
linux-vdso.so.1 (0x00007ffefc1f0000)
libcrfpp.so.0 => /usr/local/lib/libcrfpp.so.0 (0x00007f6b715b4000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f6b71398000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f6b71016000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6b70d0e000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f6b70af7000)
libc.so.6 => /lib64/libc.so.6 (0x00007f6b70737000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6b717f3000)
The CRF developers may wish to hard code /usr/local/lib/
or $PREFIX/lib
as one of the directories to search for, inside the binaries, using RPATH. To check if a binary contains RPATH, do:
CRF开发人员可能希望在二进制文件中使用RPATH将/usr/local/lib/或$前缀/lib硬编码为要搜索的目录之一。要检查二进制文件是否包含RPATH,请执行以下操作:
objdump -x $binary | grep RPATH