2

So I'm fairly new to Docker and Ubuntu and I'm trying to create a mail server by following this tutorial in Youtube. But I'm unable to do so because I keep getting some errors. And I don't know what each of these mean. I am also following the official docs from Docker website to install docker in Ubuntu and here are the output I get from each commands:

sudo apt-get install ca-certificates curl gnupg lsb-release

Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20210119~20.04.2). curl is already the newest version (7.68.0-1ubuntu2.7). gnupg is already the newest version (2.2.19-3ubuntu2.1). lsb-release is already the newest version (11.1.0ubuntu2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg


File '/usr/share/keyrings/docker-archive-keyring.gpg' exists. Overwrite? (y/N) y
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update


Get:1 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
Err:1 https://download.docker.com/linux/ubuntu focal InRelease
  Couldn't create temporary file /tmp/apt.conf.EhsiyX for passing config to apt-key
Ign:2 http://rpms.litespeedtech.com/debian focal InRelease
Get:3 http://rpms.litespeedtech.com/debian focal Release [1,646 B]
Get:4 https://deb.nodesource.com/node_14.x focal InRelease [4,583 B]
Get:5 http://rpms.litespeedtech.com/debian focal Release.gpg [836 B]
Err:4 https://deb.nodesource.com/node_14.x focal InRelease
  Couldn't create temporary file /tmp/apt.conf.cJQw53 for passing config to apt-key
Ign:5 http://rpms.litespeedtech.com/debian focal Release.gpg
Get:6 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Ign:7 http://ppa.launchpad.net/certbot/certbot/ubuntu focal InRelease
Get:8 http://us.archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Err:6 http://security.ubuntu.com/ubuntu focal-security InRelease
  Couldn't create temporary file /tmp/apt.conf.H2ZQrn for passing config to apt-key
Err:9 http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release
  404  Not Found [IP: 91.189.95.85 80]
Err:8 http://us.archive.ubuntu.com/ubuntu focal InRelease
  Couldn't create temporary file /tmp/apt.conf.TKkNRz for passing config to apt-key
Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Err:10 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
  Couldn't create temporary file /tmp/apt.conf.kdYADH for passing config to apt-key
Get:11 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Err:11 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.Z56AhL for passing config to apt-key
Reading package lists... Done
W: GPG error: https://download.docker.com/linux/ubuntu focal InRelease: Couldn't create temporary file /tmp/apt.conf.EhsiyX for passing config to apt-key
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://deb.nodesource.com/node_14.x focal InRelease: Couldn't create temporary file /tmp/apt.conf.cJQw53 for passing config to apt-key
E: The repository 'https://deb.nodesource.com/node_14.x focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://rpms.litespeedtech.com/debian focal Release: Couldn't create temporary file /tmp/apt.conf.mT1cgh for passing config to apt-key
E: The repository 'http://rpms.litespeedtech.com/debian focal Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: Couldn't create temporary file /tmp/apt.conf.H2ZQrn for passing config to apt-key
E: The repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal InRelease: Couldn't create temporary file /tmp/apt.conf.TKkNRz for passing config to apt-key
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal-updates InRelease: Couldn't create temporary file /tmp/apt.conf.kdYADH for passing config to apt-key
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://us.archive.ubuntu.com/ubuntu focal-backports InRelease: Couldn't create temporary file /tmp/apt.conf.Z56AhL for passing config to apt-key
E: The repository 'http://us.archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:62 and /etc/apt/sources.list.d/docker.list:1
sudo apt-get install docker-ce docker-ce-cli containerd.io


Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package docker-ce
E: Unable to locate package docker-ce-cli
E: Unable to locate package containerd.io
E: Couldn't find any package by glob 'containerd.io'
E: Couldn't find any package by regex 'containerd.io'

These are all the outputs I am getting and I don't know what else I should do or try but I badly need to setup my mail server. Someone please help me out. It'd be a big help.

UPDATE

So after contacting support they have restored the server to a previous working state. Then I updated/upgraded with sudo apt update and sudo apt upgrade. It completed but then after I tried running update again and I get this:

@server1:~$ sudo apt update
Hit:1 https://deb.nodesource.com/node_14.x focal InRelease
Ign:2 http://ppa.launchpad.net/certbot/certbot/ubuntu focal InRelease
Err:3 http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release
  404  Not Found [IP: 91.189.95.85 80]
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I think something is wrong with the new updates and all.

Zak
  • 121
  • Can you try create a file on /tmp ? Something like touch /tmp/file would be sufficient – Liso Nov 14 '21 at 16:04
  • @Liso hey. I can try. Can you tell me in which folder I should create that file? – Zak Nov 14 '21 at 16:09
  • I have been getting this type of /tmp errors since yesterday when I tried 3-4 different types of tutorials to create a mail server. – Zak Nov 14 '21 at 16:10
  • Just launch a terminal, run touch /tmp/file. A failed run should produce an error, paste it to here. – Liso Nov 14 '21 at 16:28
  • I don't have a GUI for my VPS. But I still ran that and got this: ```touch: cannot touch '/tmp/file': Bad message
    
    
    – Zak Nov 14 '21 at 16:37
  • @N0rbert No sorry. Just tried some of the solutions there. – Zak Nov 14 '21 at 16:45
  • I tried the solution from the chosen answer and removed the duplicates. But it is still the same. I'm thinking it could be because of my Ubuntu OS. What do you think? – Zak Nov 15 '21 at 10:30
  • @Liso Any solution to the problem? – Zak Nov 15 '21 at 10:31
  • @N0rbert Any solution to the problem? – Zak Nov 15 '21 at 10:31
  • Please read and follow the documentation. – N0rbert Nov 15 '21 at 11:25
  • @N0rbert I did. I can't even update anymore cause it shows some errors which is mentioned in OP – Zak Nov 15 '21 at 11:30
  • Bad message imply there is corrupted filesystem/drive, provided it is a vps service- can you try rebuilding it? If the issue persist, I suggest you to report this problem to your vps support. – Liso Nov 15 '21 at 11:49
  • @Liso Yes I'll contact support but I'm not sure if they'll help as I got a self-managed one. But can you please tell me if I can back up everything I have in there so that I don't lose my apps, security mods and nginx setups? – Zak Nov 15 '21 at 12:14
  • Of course, make sure there are no important files left behind. Note that my recommendation is based on the fact you got 'bad message' error, as under no circumstances should a normal machine have this problem- especially for a server. – Liso Nov 15 '21 at 12:33
  • Oh understood. Support is restoring my VPS as we speak. But what is the easiest and simplest way for noob like me to back up my VPS? – Zak Nov 15 '21 at 12:54
  • There's many resource of how to backup a Ubuntu system, personally I like rsync mainly because of how powerful it is https://help.ubuntu.com/community/BackupYourSystem – Liso Nov 15 '21 at 14:44
  • @Liso I have updated the OP with the current situation. They have restored the server but then update doesn't get completed properly. Can you please check the OP? – Zak Nov 15 '21 at 15:50

0 Answers0