kubernetes: _output/bin/deepcopy-gen: Permission denied

  1. I follow the readme.md method like this

(1) $ go get -d k8s.io/kubernetes (2) $ cd $GOPATH/src/k8s.io/kubernetes (3) $ make

  1. But third step appear wrong like:
./hack/run-in-gopath.sh: line 33: _output/bin/deepcopy-gen: Permission denied
make[1]: *** [Makefile.generated_files:246: gen_deepcopy] Error 1
make: *** [Makefile:483: generated_files] Error 2
  1. My env is in the latest docker archlinux image.

(1) sys: Linux 88295ee782e0 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 GNU/Linux

(2) docker version

Client:
 Version:	18.03.0-ce
 API version:	1.37
 Go version:	go1.10
 Git commit:	0520e24302
 Built:	Fri Mar 23 01:47:41 2018
 OS/Arch:	linux/amd64
 Experimental:	false
 Orchestrator:	swarm
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?```

(3) go env

```➜  kubernetes git:(master) go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build168012375=/tmp/go-build -gno-record-gcc-switches"```

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (14 by maintainers)

Commits related to this issue

Most upvoted comments

I might find the solution today, but I’m uncertain, since I can’t reproduce it anymore:

  1. I ensured rsync was installed in my system (apt-get install -y rsync)
  2. I ran make clean and make clean_generated
  3. make test started working

Please, @idealhack and @chenyangguang, can you check if this works for you?

@k8s-bot I had fix it by

chomd +x  $GOPATH/src/k8s.io/kubernetes/_output/bin/deepcopy-gen

Now it Compiled success. Thanks. Close this issue pls.

HI, I test it success with steps as shown down!

docker run -itd --name golang golang
docker cp k8s.io/kubernetes/ golang:/opt/
docker exec -it golang bash
apt update && apt-get install rsync
cd /opt/kubernetes && make WHAT=cmd/kubeadm

@ifosch I haven’t got time to fix it. Feel free to give it a try and discuss about it here 😃