본문 바로가기

컨테이너/Podman

fatal: Not a git repository (or any of the parent directories): .git 에러 해결

fatal: Not a git repository (or any of the parent directories): .git 에러 해결

- CentOS 7에서 Podman 4.1.1 설치를 위해  make 명령어를 사용했을 때, 다음과 같은 에러가 발생하였다.

make BUILDTAGS="selinux seccomp"

 

[에러 내용]

fatal: Not a git repository (or any of the parent directories): .git
Podman is being compiled without the systemd build tag.         Install libsystemd on Ubuntu or systemd-devel on rpm based      distro for journald support.
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build \
        -mod=vendor  \
        -ldflags '-X github.com/containers/podman/v4/libpod/define.gitCommit= -X github.com/containers/podman/v4/libpod/define.buildInfo=1666674275 -X github.com/containers/podman/v4/libpod/config._installPrefi x=/usr/local -X github.com/containers/podman/v4/libpod/config._etcDir=/usr/local/etc -X github.com/containers/common/pkg/config.additionalHelperBinariesDir= ' \
        -tags "selinux seccomp" \
        -o bin/podman ./cmd/podman
# pkg-config --cflags  -- devmapper
Package devmapper was not found in the pkg-config search path.
Perhaps you should add the directory containing `devmapper.pc'
to the PKG_CONFIG_PATH environment variable
No package 'devmapper' found
pkg-config: exit status 1
make: *** [bin/podman] Error 2

 

 

 

[에러 해결 방법]

fatal: Not a git repository (or any of the parent directories): .git

- 위 에러는 .git 파일이 생성이 안된 이슈로 아래의 명령어 입력하면 해결된다.

git init