Divide and Conquer
[에러해결] wc.go:5:2: package mapreduce is not in GOROOT (/usr/lib/go-1.18/src/mapreduce) 본문
성장캐/분산컴퓨팅
[에러해결] wc.go:5:2: package mapreduce is not in GOROOT (/usr/lib/go-1.18/src/mapreduce)
10살 2024. 5. 28. 19:25728x90
s23710660@swye:~/sequential_mapreduce/src$ cd ~/sequential_mapreduce/src/main
go run wc.go master sequential ../pg-*.txt
$GOPATH/go.mod exists but should not
s23710660@swye:~/sequential_mapreduce/src/main$
Part 2에서 계속 위와 같은 문제가 발생
$GOPATH/go.mod exists but should not 오류는 Go 모듈 모드에서 $GOPATH 디렉토리에 go.mod 파일이 있을 때 발생
→GOPATH 환경 변수를 사용하지 않고, 모듈 모드에서 제대로 작동하도록 설정
# GOPATH를 확인
echo $GOPATH
cd /home/s23710660/sequential_mapreduce
export GOPATH="$PWD"
echo $GOPATH
cd src
cd mapreduce
go mod init mapreduce
go mod tidy
cd ..
export GO111MODULE=off
cd "$GOPATH/src/main"
go run wc.go master sequential pg-*.txt
잘 돌아감
반응형
'성장캐 > 분산컴퓨팅' 카테고리의 다른 글
Goroutine 스케줄링 (0) | 2024.06.04 |
---|---|
[에러해결] go tool compile: fork/exec /usr/lib/go-1.18/pkg/tool/linux_amd64/compile: resource temporarily unavailable (0) | 2024.05.29 |
[에러해결] ok mapreduce (cached) (0) | 2024.05.28 |
[에러해결] go: warning: "mapreduce/..." matched no packages (0) | 2024.05.28 |
[에러해결] open mrtmp.test-34-19: too many open files (0) | 2024.03.13 |
Comments