Kubeadm installation error on apt-transport-https

Team;
I’m trying to install kubeadm on a Ubuntu 16.04 Xenial VM, and I’m following all the steps provided at the Installing kubeadm | Kubernetes ,

After Docker installation when I reach at

I get the following error. and after this error what ever I try to install I get nothing.

root@kubemaster:/home/osboxes# sudo apt-get install -y apt-transport-https curl
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bridge-utils libcwidget3v5 ubuntu-fan
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  apt apt-utils aptitude aptitude-common debian-archive-keyring gcc-10-base
  libapt-pkg6.0 libboost-iostreams1.71.0 libbrotli1 libc-bin libc-dev-bin
  libc-l10n libc6 libc6-dbg libc6-dev libcom-err2 libcomerr2 libcrypt-dev
  libcrypt1 libcurl4 libcwidget4 libffi7 libgcc-s1 libgcrypt20
  libgnutls-openssl27 libgnutls30 libgpg-error-l10n libgpg-error0
  libgssapi-krb5-2 libhogweed5 libidn2-0 libk5crypto3 libkrb5-3
  libkrb5support0 liblzma5 libncursesw6 libnettle7 libnghttp2-14 libp11-kit0
  libpsl5 libseccomp2 libsigc++-2.0-0v5 libssh2-1 libssl1.1 libstdc++6
  libtasn1-6 libtinfo6 libunistring2 libxapian30 libzstd1 locales manpages
  manpages-dev p11-kit-modules publicsuffix
Suggested packages:
  apt-doc apt-xapian-index aptitude-doc-en | aptitude-doc debtags tasksel
  glibc-doc libcwidget-dev rng-tools gnutls-bin krb5-doc krb5-user
  xapian-tools
The following packages will be REMOVED:
  libcurl3 whoopsie
The following NEW packages will be installed:
  debian-archive-keyring gcc-10-base libapt-pkg6.0 libboost-iostreams1.71.0
  libbrotli1 libc-l10n libcom-err2 libcrypt-dev libcrypt1 libcurl4 libcwidget4
  libffi7 libgcc-s1 libgpg-error-l10n libhogweed5 libidn2-0 libncursesw6
  libnettle7 libnghttp2-14 libpsl5 libssh2-1 libssl1.1 libtinfo6 libunistring2
  libxapian30 libzstd1 publicsuffix
The following packages will be upgraded:
  apt apt-transport-https apt-utils aptitude aptitude-common curl libc-bin
  libc-dev-bin libc6 libc6-dbg libc6-dev libcomerr2 libgcrypt20
  libgnutls-openssl27 libgnutls30 libgpg-error0 libgssapi-krb5-2 libk5crypto3
  libkrb5-3 libkrb5support0 liblzma5 libp11-kit0 libseccomp2 libsigc++-2.0-0v5
  libstdc++6 libtasn1-6 locales manpages manpages-dev p11-kit-modules
30 upgraded, 27 newly installed, 2 to remove and 1217 not upgraded.
Need to get 43.8 MB of archives.
After this operation, 41.4 MB of additional disk space will be used.
**### WARNING: The following packages cannot be authenticated!**
  gcc-10-base libgcc-s1 libc6 libcrypt1 libc-l10n locales libc-bin libc6-dbg
  libc-dev-bin manpages-dev manpages libc6-dev libcrypt-dev libgpg-error0
  libgcrypt20 libstdc++6 libzstd1 aptitude aptitude-common liblzma5
  libboost-iostreams1.71.0 libtinfo6 libncursesw6 libsigc++-2.0-0v5
  libcwidget4 libxapian30 debian-archive-keyring libnettle7 libhogweed5
  libunistring2 libidn2-0 libffi7 libtasn1-6 p11-kit-modules libp11-kit0
  libgnutls-openssl27 libgnutls30 libseccomp2 apt-transport-https apt-utils
  libapt-pkg6.0 apt libcom-err2 libcomerr2 libbrotli1 libgssapi-krb5-2
  libkrb5-3 libk5crypto3 libkrb5support0 libssl1.1 libnghttp2-14 libpsl5
  libssh2-1 libcurl4 curl libgpg-error-l10n publicsuffix
E: There were unauthenticated packages and -y was used without --allow-unauthenticated
root@kubemaster:/home/osboxes# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
OK
root@kubemaster:/home/osboxes# cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
> deb https://apt.kubernetes.io/ kubernetes-xenial main
> EOF

I’m stuck on this for a week now, I roll-backed and created a new VM and still got the same error. This is my first try of doing anything on Ubuntu or Kubernetes, I’m trying to find out a solution for this but I can’t find any on any search engine your kind help is required.

First you have to update your apt repository then try this.

Rana, I did that, I updated, upgraded everything