구축하려고 해요모세, 그러나 실행하면 make
다음과 같은 결과가 나타납니다.
minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release
# Compile the parts
make all
make[1]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts'
# Building memscore may fail e.g. if boost is not available.
# We ignore this because traditional scoring will still work and memscore isn't used by default.
cd training/memscore ; \
./configure && make \
|| ( echo "WARNING: Building memscore failed."; \
echo 'training/memscore/memscore' >> ../../release-exclude )
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for boostlib >= 1.31.0... yes
checking for cos in -lm... yes
checking for gzopen in -lz... yes
checking for cblas_dgemm in -lgslcblas... no
checking for gsl_blas_dgemm in -lgsl... no
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking n_gram.h usability... no
checking n_gram.h presence... no
checking for n_gram.h... no
checking for size_t... yes
checking for ptrdiff_t... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make all-am
make[3]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[3]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
touch release-exclude # No files excluded by default
pwd=`pwd`; \
for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \
make -C training/$subdir || exit 1; \
echo "### Compiler $subdir"; \
cd $pwd; \
done
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
### Compiler cmert-0.5
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
### Compiler phrase-extract
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
### Compiler symal
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
### Compiler mbr
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
### Compiler lexical-reordering
## All files that need compilation were compiled
make[1]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts'
/bin/sh: ./check-dependencies.pl: Permission denied
make: *** [release] Error 126
minakshi@minakshi-Vostro-3500:~/Desktop/working-dir/moses/scripts$ make release
# Compile the parts
make all
make[1]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts'
# Building memscore may fail e.g. if boost is not available.
# We ignore this because traditional scoring will still work and memscore isn't used by default.
cd training/memscore ; \
./configure && make \
|| ( echo "WARNING: Building memscore failed."; \
echo 'training/memscore/memscore' >> ../../release-exclude )
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for boostlib >= 1.31.0... yes
checking for cos in -lm... yes
checking for gzopen in -lz... yes
checking for cblas_dgemm in -lgslcblas... no
checking for gsl_blas_dgemm in -lgsl... no
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking n_gram.h usability... no
checking n_gram.h presence... no
checking for n_gram.h... no
checking for size_t... yes
checking for ptrdiff_t... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make all-am
make[3]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[3]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/memscore'
touch release-exclude # No files excluded by default
pwd=`pwd`; \
for subdir in cmert-0.5 phrase-extract symal mbr lexical-reordering; do \
make -C training/$subdir || exit 1; \
echo "### Compiler $subdir"; \
cd $pwd; \
done
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/cmert-0.5'
### Compiler cmert-0.5
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/phrase-extract'
### Compiler phrase-extract
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/symal'
### Compiler symal
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/mbr'
### Compiler mbr
make[2]: Entering directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts/training/lexical-reordering'
### Compiler lexical-reordering
## All files that need compilation were compiled
make[1]: Leaving directory `/home/minakshi/Desktop/working-dir/moses/scripts'
/bin/sh: ./check-dependencies.pl: not found
make: *** [release] Error 127
오류 메시지에는 "찾을 수 없음"이 표시되지만 폴더에 파일이 존재하는 것으로 ./check-dependencies.pl
보입니다 . scripts
그렇다면 왜 이런 오류가 발생하는 걸까요?
답변1
이 오류의 가장 가능성 있는 원인은 check-dependencies.pl
파일이 makefile이 찾는 디렉토리에 없기 때문입니다. 그러나 파일이 check-dependencies.pl
에 존재한다면 /home/minakshi/Desktop/working-dir/moses/scripts
또 다른 가능성이 있습니다. 아마도 해당 로더가 존재하지 않을 수도 있습니다.
- 스크립트의 경우 로더는 앞서 언급한 인터프리터입니다.셰르본줄, 즉 첫 번째 줄은 다음으로 시작해야 하며
#!
그 뒤에는 인터프리터에 대한 경로가 와야 합니다. - 바이너리 파일의 경우 로더는 다음과 같습니다.동적 링커(정적으로 링크된 실행 파일에는 로더가 없습니다) - 참조64비트 시스템에서 32비트 바이너리를 실행할 때 "찾을 수 없음" 메시지 수신.
커널이 프로그램을 실행하라는 명령을 받으면 로더를 실행하고 로드할 실행 파일을 전달합니다. 로더를 찾을 수 없으면 커널은 "찾을 수 없음"만 보고할 수 있으며 "직접 요청한 파일을 찾을 수 없음"과 "로더를 찾을 수 없음"을 구별할 방법이 없습니다. 때로는 실행 셸이 더 명확한 오류 메시지를 표시하기 위해 두 번째 검사를 수행하지만 때로는 실제로는 스크립트나 동적으로 링크된 실행 파일을 찾을 수 없거나 실행할 수 없다는 이상한 메시지가 표시되기도 합니다. 파일이 존재하고 실행 가능하지만 해당 로더에 오류가 적용됩니다.
.pl
확장 기능을 사용하면 check-dependencies.pl
아마도 Perl 스크립트일 것입니다. 이는 #!/usr/local/bin/perl
시스템의 Perl 인터프리터에 대한 경로를 제공하지 않는 다음 과 같은 줄로 시작할 수 있습니다 . 스크립트를 편집하고 첫 번째 줄을 수정해야 할 수도 있고 그 반대의 경우도 마찬가지입니다 #!/usr/local/bin/perl
.#!/usr/bin/perl
Perl은 일반적으로 Linux에서 발견되지만 다른 많은 유닉스 /usr/bin
에서도 발견됩니다. /usr/local/bin
통역사 경로를 미리 알지 못한 채 shebang 줄을 작성하는 방법이 있습니다: #!/usr/bin/env perl
. shebang 라인에는 절대 경로 가 필요합니다 . env
여기서 인터프리터는 인수가 전달되지 않은 경우에만 작동 합니다 . Linux를 포함한 많은 시스템은 명령줄에서 단일 인수를 허용합니다. 이라는 프로그램을 실행하려고 시도하기 때문에 실패합니다 .perl
$PATH
#!/usr/bin/perl -T
#!/usr/bin/env perl
#!/usr/bin/env perl -T
perl -T