开发者社区> 问答> 正文

64位ubuntu ECS下CRF++(NLP工具)配置出错

ht_zhang 2016-07-30 16:32:00 4225

首先我租用的是阿里云的64位的ubuntu14.04服务器。
通过scp命令我已经成功将本地(本地为ubuntu16.04)的crf++-0.58上传到了服务器。
具体的路径为/root/CRF++-0.58
之后按照crf++内部的帮助本件进行安装(之前在本地桌面端安装过一次,按照顺序安装非常的成功)
第一步还是cd到目标文件夹,输入./configure。运行后没有报错
接下来我就按照要求输入make,运行结果如下
root@iZ28r911y1mZ:~/CRF++-0.58# make
make all-am
make[1]: Entering directory `/root/CRF++-0.58'
/bin/bash ./libtool --tag=CXX --mode=link g++ -O3 -Wall -o libcrfpp.la -rpath /usr/local/lib libcrfpp.lo lbfgs.lo param.lo encoder.lo feature.lo feature_cache.lo feature_index.lo node.lo path.lo tagger.lo -lpthread -lpthread -lm -lm -lm
libtool: link: g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbeginS.o .libs/libcrfpp.o .libs/lbfgs.o .libs/param.o .libs/encoder.o .libs/feature.o .libs/feature_cache.o .libs/feature_index.o .libs/node.o .libs/path.o .libs/tagger.o -lpthread -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.8/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o -O3 -Wl,-soname -Wl,libcrfpp.so.0 -o .libs/libcrfpp.so.0.0.0
/usr/bin/ld: .libs/lbfgs.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[1]: * [libcrfpp.la] Error 1
make[1]: Leaving directory `/root/CRF++-0.58'
make: * [all] Error 2
因为自己不是非常懂,看上面好像从这里开始
/usr/bin/ld: .libs/lbfgs.o: unrecognized relocation (0x2a) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[1]: * [libcrfpp.la] Error 1
出现了问题。
谷歌百度了一下午依旧没有解决,同时也没有看到类似的方案。
非常着急,求求各位大牛解答一下!

弹性计算 自然语言处理 Ubuntu Shell C语言
分享到
取消 提交回答
全部回答(1)
  • dongshan8
    2019-07-17 20:02:02

    您好,

    我选择公共镜像里的ubuntu14.04 64位系统,后尝试按这里的步骤安装:https://taku910.github.io/crfpp/#source

    得到这样的,是不是表示成功了?

    libtool: install: ranlib /usr/local/lib/libcrfpp.a
    libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin" ldconfig -n /usr/local/lib


    Libraries have been installed in:
    /usr/local/lib

    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:

    • add LIBDIR to the `LD_LIBRARY_PATH' environment variable
      during execution
    • add LIBDIR to the `LD_RUN_PATH' environment variable
      during linking
    • use the `-Wl,-rpath -Wl,LIBDIR' linker flag
    • have your system administrator add LIBDIR to `/etc/ld.so.conf'

    See any operating system documentation about shared libraries for

    more information, such as the ld(1) and ld.so(8) manual pages.

    test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
    /bin/bash ./libtool --mode=install /usr/bin/install -c crf_learn crf_test '/usr/local/bin'
    libtool: install: /usr/bin/install -c .libs/crf_learn /usr/local/bin/crf_learn
    libtool: install: /usr/bin/install -c .libs/crf_test /usr/local/bin/crf_test
    test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
    /usr/bin/install -c -m 644 crfpp.h '/usr/local/include'
    make[1]: Leaving directory `/root/install/CRF++-0.58'
    root@iZ23jyp275rZ:~/install/CRF++-0.58#

    0 0

集结各类场景实战经验,助你开发运维畅行无忧

推荐文章
相似问题