linux - ft-models.out makefile 错误

标签 linux makefile ubuntu-12.04

我只是尝试编译一个makefile,但它不起作用, 我的 Makefile 是这样的,

这对我来说非常重要,我将上传并发布所有文件夹的链接, 如果有人能帮助我,他可能会去天堂:D 这是我所有文件夹的链接, 任何人都可以在 LINUX 上运行这个代码吗? http://s2.dosya.tc/server/OfLhtU/Desktop.zip.html

TRAIN=correctparses_03.txt.gz
TEST=test.1.2.dis.gz
FST=tfeatures.fst turknum.fst turkunk.fst unknown.fst
SCRIPTS=lookup dlist script.txt singleline.pl merge.pl features.pl ft-models.pl          ft-model-eval.pl
LIBS    =   -L"/usr/include/glib-2.0"   -lglib

all: eval.out

eval.out: test.features.gz ft-model-eval.pl ft-models.out
@echo === Evaluating the disambiguation model
zcat $< | ft-model-eval.pl -v > $@ 2> eval.err
tail -5 eval.err

test.features.gz: test.merge.gz features.pl
@echo === Preparing testing features for a +-2 word window
zcat $< | features.pl | gzip > $@

test.merge.gz: ${TEST} test.lookup.gz merge.pl
@echo === Merging answers in testing file with lookup results
merge.pl 'zcat ${TEST} |' 'zcat test.lookup.gz |'  2> $@.err | gzip > $@

test.lookup.gz: ${TEST} ${FST} script.txt singleline.pl lookup
@echo === Running lookup on the testing file
zcat $< | awk '{print $$1}' | lookup -f script.txt | singleline.pl | gzip > $@

ft-models.out: ft-models.pl dlist train.features.gz
@echo === Training individual feature models
ft-models.pl 'zcat train.features.gz |'

train.features.gz: train.merge.gz features.pl
@echo === Preparing training features for a +-2 word window
zcat $< | features.pl | gzip > $@

train.merge.gz: ${TRAIN} train.lookup.gz merge.pl
@echo === Merging answers in training file with lookup results
merge.pl 'zcat ${TRAIN} |' 'zcat train.lookup.gz |' 2> $@.err | gzip > $@

train.lookup.gz: ${TRAIN} ${FST} script.txt singleline.pl lookup
@echo === Running lookup on the training file
zcat $< | awk '{print $$1}' | lookup -f script.txt | singleline.pl | gzip > $@

clean:
-rm train.lookup.gz
-rm train.merge.gz train.merge.gz.err
-rm train.features.gz
-rm -rf ft-models.out
-rm test.lookup.gz
-rm test.merge.gz tst.merge.gz.err
-rm test.features.gz
-rm dlist.{dbg,tst,trn,val}
-rm eval.{out,err}


# To compile the dlist decision list induction program:

# CC=gcc
# CFLAGS=-O3 -Wall -I. `pkg-config --cflags glib-2.0`
# LIBS=`pkg-config --libs glib-2.0`

# dlist: dlist.o glib-ext.o
#   $(CC) $(CFLAGS) $^ $(LIBS) -o $@

# dlist.o: dlist.c glib-ext.h

# glib-ext.o: glib-ext.c glib-ext.h

当我运行这个 make 文件时,错误是;

  make: ft-models.pl: Command not found
 make: *** [ft-models.out] Error 127

我该如何解决它?谢谢...

实际上是第一个错误

=== Running lookup on the testing file
zcat test.1.2.dis.gz | awk '{print $1}' | lookup -f script.txt | singleline.pl | gzip > test.lookup.gz
/bin/sh: 1: lookup: not found
/bin/sh: 1: singleline.pl: not found
=== Merging answers in testing file with lookup results
merge.pl 'zcat test.1.2.dis.gz |' 'zcat test.lookup.gz |'  2> test.merge.gz.err | gzip      > test.merge.gz
=== Preparing testing features for a +-2 word window
zcat test.merge.gz | features.pl | gzip > test.features.gz
/bin/sh: 1: features.pl: not found
=== Running lookup on the training file
zcat correctparses_03.txt.gz | awk '{print $1}' | lookup -f script.txt | singleline.pl | gzip > train.lookup.gz
/bin/sh: 1: singleline.pl: not found
/bin/sh: 1: lookup: not found
=== Merging answers in training file with lookup results
merge.pl 'zcat correctparses_03.txt.gz |' 'zcat train.lookup.gz |' 2> train.merge.gz.err | gzip > train.merge.gz
=== Preparing training features for a +-2 word window
zcat train.merge.gz | features.pl | gzip > train.features.gz
/bin/sh: 1: features.pl: not found
=== Training individual feature models
./ft-models.pl 'zcat train.features.gz |'
Finding unique morphological features in data
Found 0 morphological features
=== Evaluating the disambiguation model
zcat test.features.gz | ft-model-eval.pl -v > eval.out 2> eval.err
make: *** [eval.out] Error 127

最佳答案

可能需要采取几个步骤才能解决此问题。在第 28 行,更改此内容:

ft-models.pl ...

对此:

./ft-models.pl ...

告诉我们结果(在此答案的评论中)。

编辑:

好!现在,在第 20 行和第 36 行中,更改此内容:

merge.pl ...

对此:

./merge.pl ...

并告诉我们会发生什么。

关于linux - ft-models.out makefile 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15032983/

相关文章:

linux - Amazon EC2 - 切换到无密码用户时提示输入密码

linux - lowriter 仅适用于 sudo

c - Linux API/库枚举特定IP的所有监听端口

arrays - 如何在Makefile中将变量列表用作目标?

makefile - 使用 distcc 在 Raspberry pi 上编译 gnuradio

r - 将 RScript 的输出分配给 makefile 变量

c - 对 sync_fetch_and_add_4 的 undefined reference

linux - dotnet build 访问路径被拒绝

linux - 如何安装 pecl_http ubuntu

ubuntu - 如何从桌面隐藏启动器?