Linux

安裝 libLBFGS + cygwin 時出現安裝遞歸錯誤

  • December 13, 2013

我正在根據這些說明在 cygwin 中為 CRFSuite 建構二進製文件:

In Linux environments, download the source package of libLBFGS, and build it. 
If you do not want to install libLBFGS into your operating system, specify
"--prefix" option to the configure script. This example installs libLBFGS
to the directory local under the home directory ($HOME).

$ ./configure 
$ make
$ make install

在這裡我執行./configure並且make沒有問題,make check但是當我執行時make install,我遇到了以下錯誤:

$ make install
Making install in lib
make[1]: Entering directory '/cygdrive/c/home/liblbfgs-1.10/lib'
make[2]: Entering directory '/cygdrive/c/home/liblbfgs-1.10/lib'
test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib"
/bin/sh ../libtool --mode=install /usr/bin/install -c  'liblbfgs.la' '/usr/local/lib/liblbfgs.la'
/usr/bin/install -c .libs/liblbfgs.dll.a /usr/local/lib/liblbfgs.dll.a
base_file=`basename ${file}`
dlpath=`/bin/sh 2>&1 -c '. .libs/'${base_file}'i;echo $dlname'`
dldir=/usr/local/lib/`dirname $dlpath`
test -d $dldir || mkdir -p $dldir
/usr/bin/install -c .libs/cyglbfgs-1-10.dll $dldir/cyglbfgs-1-10.dll
/usr/bin/install -c .libs/liblbfgs.lai /usr/local/lib/liblbfgs.la
/usr/bin/install -c .libs/liblbfgs.a /usr/local/lib/liblbfgs.a
ranlib /usr/local/lib/liblbfgs.a
C:\Dwimperl\c\bin\ranlib.exe: '/usr/local/lib/liblbfgs.a': No such file
Makefile:239: recipe for target 'install-libLTLIBRARIES' failed
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory '/cygdrive/c/home/liblbfgs-1.10/lib'
Makefile:413: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/cygdrive/c/home/liblbfgs-1.10/lib'
Makefile:282: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

任何的想法?

您的路徑可能設置錯誤,您使用了錯誤的ranlib。您正在使用的那個是為 windows 編譯的,而不是為 cygwin 編譯的,並且無法辨識 cygwin 路徑。

引用自:https://unix.stackexchange.com/questions/104769