Hello to everyone.
I’ve just installed ubuntu 22.04 (for arm64) on my jetson nano. I’m trying to compile and build go and docker from the source code because docker stopped to work on the 22.04,but it works on ubuntu 18.04 and 20.04. The kernel that I use is always the same,so it’s not its fault if Docker does not work. I suppose there is some incompatibility between some component present only on ubuntu 22.04 and not on ubuntu 18 and 20. The error is the following :
# docker images REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest 46331d942d63 13 months ago 9.14kB # docker run hello-world docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: function not implemented: unknown. ERRO error waiting for container: context canceled
Dunno why it happens.
I’ve found this tutorial :
and I’ve started to follow it,saving every command issued :
$ cd /home/marietto $ wget https://dl.google.com/go/go1.20.3.linux-arm64.tar.gz $ tar -xf archive.tar.gz $ mv go go1.20.3 $ nano /home/marietto/.profile PATH="$HOME/bin:$HOME/.local/bin:$PATH" GOROOT_BOOTSTRAP="$HOME/go1.20.3" export PATH export GOROOT_BOOTSTRAP $ source /home/marietto/.profile $ git clone https://go.googlesource.com/go go_git Clone in 'go_git' in corso... remote: Finding sources: 100% (10/10) remote: Total 570024 (delta 454760), reused 570018 (delta 454760) Ricezione degli oggetti: 100% (570024/570024), 333.21 MiB | 6.12 MiB/s, fatto. Risoluzione dei delta: 100% (454760/454760), fatto. Aggiornamento dei file in corso: 100% (12328/12328), fatto. $ cd go_git $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/release-branch.go1 remotes/origin/release-branch.go1.1 remotes/origin/release-branch.go1.10 remotes/origin/release-branch.go1.11 remotes/origin/release-branch.go1.12 remotes/origin/release-branch.go1.13 remotes/origin/release-branch.go1.14 remotes/origin/release-branch.go1.15 remotes/origin/release-branch.go1.16 remotes/origin/release-branch.go1.17 remotes/origin/release-branch.go1.18 remotes/origin/release-branch.go1.19 remotes/origin/release-branch.go1.2 remotes/origin/release-branch.go1.20 remotes/origin/release-branch.go1.3 remotes/origin/release-branch.go1.4 remotes/origin/release-branch.go1.5 remotes/origin/release-branch.go1.6 remotes/origin/release-branch.go1.7 remotes/origin/release-branch.go1.8 remotes/origin/release-branch.go1.9 $ cd /home/marietto/go_git/src $ bash make.bash Building Go cmd/dist using /home/marietto/go1.20.3. (go1.20.3 linux/arm64) Building Go toolchain1 using /home/marietto/go1.20.3. Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. Building Go toolchain2 using go_bootstrap and Go toolchain1. Building Go toolchain3 using go_bootstrap and Go toolchain2. Building packages and commands for linux/arm64. Installed Go for linux/arm64 in /home/marietto/go_git Installed commands in /home/marietto/go_git/bin marietto@marietto-nano:~/go_git/src$ sudo nano /home/marietto/.profile GOROOT_BOOTSTRAP="/home/marietto/go1.20.3" GOROOT=$HOME/go_git GOPATH=$HOME/docker_build PATH="$HOME/bin:$HOME/.local/bin:$PATH:$GOROOT/bin:$GOPATH/bin" export PATH export GOROOT_BOOTSTRAP export GOROOT export GOPATH $ go version go version go1.20.3 linux/arm64
I don’t understand where the real error is. According with the tutorial after having issued this command :
$ go get -d github.com/docker/docker
I should have had this path :
instead,I have this one :
I don’t know if it is good or not,since I read “email@example.com+incompatible”. Anyway I have issued the next commands,to see what was happened.
Where he says :“Note : containerd by default installs as static in the install script. Due to that failing (most likely needs musl to properly compile statically) I instead decided to install it as dynamic, meaning it needed to be one-offed”
According with the tutorial I’ve created the script called compile_docker_utils.sh and I have set it +x and I ran it :
compile_docker_utils.sh : PREFIX="$HOME/docker_utils" ./install.sh containerd dynamic for package in "runc vndr" do PREFIX="$HOME/docker_utils" ./install.sh $package done
This is what happened :
+ RM_GOPATH=0 TMP_GOPATH= : /home/marietto/docker_utils '[' -z '' ']' ++ mktemp -d export GOPATH=/tmp/tmp.ZhgEkEF3Ly GOPATH=/tmp/tmp.ZhgEkEF3Ly RM_GOPATH=1 case "$(go env GOARCH)" in ++ go env GOARCH export GO_BUILDMODE=-buildmode=pie GO_BUILDMODE=-buildmode=pie ++ dirname ./install.sh dir=. bin=containerd shift '[' '!' -f ./containerd.installer ']' . ./containerd.installer ++ set -e ++ : v1.6.20 install_containerd dynamic echo 'Install containerd version v1.6.20' Install containerd version v1.6.20 git clone https://github.com/containerd/containerd.git /tmp/tmp.ZhgEkEF3Ly/src/github.com/containerd/containerd Clone in '/tmp/tmp.ZhgEkEF3Ly/src/github.com/containerd/containerd' in corso... remote: Enumerating objects: 111847, done. remote: Counting objects: 100% (288/288), done. remote: Compressing objects: 100% (159/159), done. remote: Total 111847 (delta 147), reused 237 (delta 126), pack-reused 111559 Ricezione degli oggetti: 100% (111847/111847), 94.08 MiB | 6.21 MiB/s, fatto. Risoluzione dei delta: 100% (70427/70427), fatto. Aggiornamento dei file in corso: 100% (5268/5268), fatto. cd /tmp/tmp.ZhgEkEF3Ly/src/github.com/containerd/containerd git checkout -q v1.6.20 export 'BUILDTAGS=netgo osusergo static_build' BUILDTAGS='netgo osusergo static_build' export EXTRA_FLAGS=-buildmode=pie EXTRA_FLAGS=-buildmode=pie export 'EXTRA_LDFLAGS=-extldflags "-fno-PIC -static"' EXTRA_LDFLAGS='-extldflags "-fno-PIC -static"' '[' dynamic = dynamic ']' export BUILDTAGS= BUILDTAGS= export EXTRA_FLAGS= EXTRA_FLAGS= export EXTRA_LDFLAGS= EXTRA_LDFLAGS= make bin/ctr go: no such tool "compile" make: *** [Makefile:249: bin/ctr] Errore 2 RM_GOPATH=0 TMP_GOPATH= : /home/marietto/docker_utils '[' -z '' ']' ++ mktemp -d export GOPATH=/tmp/tmp.exqHoLQLtJ GOPATH=/tmp/tmp.exqHoLQLtJ RM_GOPATH=1 case "$(go env GOARCH)" in ++ go env GOARCH export GO_BUILDMODE=-buildmode=pie GO_BUILDMODE=-buildmode=pie ++ dirname ./install.sh dir=. bin=runc shift '[' '!' -f ./runc.installer ']' . ./runc.installer ++ set -e ++ : v1.1.5 install_runc proxy tini tomlv vndr RUNC_BUILDTAGS=seccomp echo 'Install runc version v1.1.5 (build tags: seccomp)' Install runc version v1.1.5 (build tags: seccomp) git clone https://github.com/opencontainers/runc.git /tmp/tmp.exqHoLQLtJ/src/github.com/opencontainers/runc Clone in '/tmp/tmp.exqHoLQLtJ/src/github.com/opencontainers/runc' in corso... remote: Enumerating objects: 38294, done. remote: Counting objects: 100% (77/77), done. remote: Compressing objects: 100% (59/59), done. remote: Total 38294 (delta 23), reused 59 (delta 18), pack-reused 38217 Ricezione degli oggetti: 100% (38294/38294), 18.24 MiB | 4.57 MiB/s, fatto. Risoluzione dei delta: 100% (25163/25163), fatto. cd /tmp/tmp.exqHoLQLtJ/src/github.com/opencontainers/runc git checkout -q v1.1.5 '[' -z proxy ']' target=proxy make BUILDTAGS=seccomp proxy make: *** No rule to make target «proxy». Stop.
The same happens with tini,tomlv,vndr. Are these components fundamentals to run Docker ? Why won’t it compile them ? Is there another method to install them ?
I went on the Golang forum and one developer wrote :
"Please do not install Docker as a snap, as this fundamentally breaks several parts of Docker. This is a well known limitation of snap. Simply install from the Docker repository, instructions are on the Docker website.
Building Docker is complicated, as it predates Go modules and still has no fully working mod (there’s actually a vendoring mog that somehow gets swapped in). If anything, build from moby/moby as this is now the official source repo for building Moby (Docker). This is complicated and the documentation warns any ambitious adventurer to expect a very bumpy ride. Well, they phrase it differently"
so,ok. I have removed docker via snap. Actually I keep Docker installed only via the ubuntu packages. It does not work anyway. He suggests to “install docker from the repository,instructions are on the docker website”. Can someone point me to that instructions ? I haven’t been able to find them. I accept every suggestion you want to give to me. Thanks.