Welcome to the Linux Foundation Forum!

Lab 4.5

Options

I am not sure if there is an issue with my version, but i am not able to proceed further.

root@EstherB:~# OS=xUbuntu_20.04
root@EstherB:~# VERSION=1.21
root@EstherB:~# VERSION_ID=20.04
root@EstherB:~# echo "debhttps://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
root@EstherB:~# echo "debhttp://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" >/etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
root@EstherB:~# curl -Lhttps://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.
root@EstherB:~# curl -Lhttps://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.
root@EstherB:~# exit
logout
ebabade@EstherB:~$ sudo apt update
E: Type 'debhttps://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/' is not known on line 1 in source list /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
E: Type 'debhttp://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/1.21/xUbuntu_20.04/' is not known on line 1 in source list /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:1.21.list
E: The list of sources could not be read.

I tried two different versions but still got the same error.

Comments

  • chrispokorni
    chrispokorni Posts: 2,190
    Options

    Hi @ebabade,

    It seems that when the lab guide was converted into PDF a few empty spaces disappeared between "deb" and "https", and between "-L" and "https" respectively. Please try to edit the commands prior to running them in your terminal, to add the missing empty space characters:

    echo "deb https://download...

    curl -L https://download...

    The warnings about apt-key can be disregarded.

    Regards,
    -Chris

  • ebabade
    ebabade Posts: 9
    Options

    Thank you @chrispokorni it worked for me

  • ebabade
    ebabade Posts: 9
    Options

    Not sure why i am still getting this warning, do i just ignore it?

    root@EstherB:~# curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERS
    ION/$OS/Release.key | apt-key add -
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
    100 393 100 393 0 0 614 0 --:--:-- --:--:-- --:--:-- 615
    100 394 100 394 0 0 512 0 --:--:-- --:--:-- --:--:-- 512
    100 395 100 395 0 0 439 0 --:--:-- --:--:-- --:--:-- 439
    100 396 100 396 0 0 384 0 0:00:01 0:00:01 --:--:-- 0
    100 397 100 397 0 0 342 0 0:00:01 0:00:01 --:--:-- 342
    100 1093 100 1093 0 0 838 0 0:00:01 0:00:01 --:--:-- 838
    OK

    Also cri is not installing for me:

    ebabade@EstherB:~$ sudo apt install -y cri-o cri-o-runc
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    E: Unable to locate package cri-o

  • chrispokorni
    chrispokorni Posts: 2,190
    Options

    Hi @ebabade,

    For the latest cri-o release, please try the following installation steps, extracted from the cri-o official installation docs https://github.com/cri-o/cri-o/blob/main/install.md#apt-based-operating-systems

    The variables exported below are specific for Ubuntu 20.04 and cri-o version 1.26 (aligned with the latest Kubernetes release). Please keep in mind that the crictl version and installation in Lab exercise 4.6 should also reflect the official crictl installation docs https://github.com/kubernetes-sigs/cri-tools#install

    student@ubuntu:~$ sudo apt update ; sudo apt upgrade -y

    student@ubuntu:~$ sudo -i

    root@ubuntu:~# export OS=xUbuntu_20.04

    root@ubuntu:~# export VERSION=1.26

    root@ubuntu:~# echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list

    root@ubuntu:~# apt update

    root@ubuntu:~# apt install -y -t buster-backports libseccomp2 || apt update -y -t buster-backports libseccomp2

    root@ubuntu:~# echo "deb [signed-by=/usr/share/keyrings/libcontainers-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list

    root@ubuntu:~# echo "deb [signed-by=/usr/share/keyrings/libcontainers-crio-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list

    root@ubuntu:~# mkdir -p /usr/share/keyrings

    root@ubuntu:~# curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-archive-keyring.gpg

    root@ubuntu:~# curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/Release.key | gpg --dearmor -o /usr/share/keyrings/libcontainers-crio-archive-keyring.gpg

    root@ubuntu:~# apt update

    root@ubuntu:~# apt install -y cri-o cri-o-runc

    Regards,
    -Chris

Categories

Upcoming Training