메이크 스크립트 실행 :'그런 파일이 없습니다 또는 디렉토리'폴더 구조가과 같이 설정
do_stuff:
for ks in keyspaces/*; do \
cqlsh -f "$${ks}/bootstrap.cql"; \
done
:이 코드를 포함하는 I 메인 디렉토리에 Makefile을 가지고
Main directory
\_ keyspaces
\_ f1
\_ bootstrap.cql
\_ anotherFolder
\_ 0001-something.cql
\_ f2
\_ bootstrap.cql
\_ anotherFolder
\_ 0001-something.cql
\_ 0002-moreSomething.cql
에게 make do_stuff
을 메인 디렉토리에서 (iTerm2를 사용하여) 터미널에서 실행하면 다음과 같은 오류 메시지가 나타납니다.
Can't open 'keyspaces/f1/bootstrap.cql': [Errno 2] No such file or directory: 'keyspaces/f1/bootstrap.cql'
command terminated with exit code 1
Can't open 'keyspaces/f2/bootstrap.cql': [Errno 2] No such file or directory: 'keyspaces/f2/bootstrap.cql'
command terminated with exit code 1
make: *** [do_stuff] Error 1
그러나 터미널에서 이것을 실행하면 : cat keyspaces/f1/bootstrap.sql
그 파일의 내용이 출력되므로 경로가 정확하고 존재하지만 cqlsh는 인식 할 수 없습니까?
the Cassandra/cqlsh docs에서 보면 -f
명령을 올바르게 사용하고있는 것처럼 보이므로 오류가 발생하는 이유를 알 수 없습니다. 내가 Makefile을 다음과 같은 잠재적 인 문제
.
├── Makefile
└── keyspaces
├── f1
│ └── bootstrap.cql
└── f2
└── bootstrap.cql
을 제거하는 간단한 단계를 시작할 것
'cat keyspaces/f1/bootstrap.cql'은 어떻습니까? – Beta