Can't install certbot on Ubuntu 20 LTS

Hello,

On Ubuntu 20 LTS with nginx, I type:

sudo apt install certbot

I get errors:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libargon2-0 python3-pyparsing
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python3-certbot-apache python3-certbot-nginx python-certbot-doc
The following NEW packages will be installed:
  certbot
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
16 not fully installed or removed.
Need to get 17.9 kB of archives.
After this operation, 51.2 kB of additional disk space will be used.
Get:1 http://mirrors.digitalocean.com/ubuntu focal/universe amd64 certbot all 0.                                                           40.0-1 [17.9 kB]
Fetched 17.9 kB in 0s (420 kB/s)
Selecting previously unselected package certbot.
(Reading database ... 96166 files and directories currently installed.)
Preparing to unpack .../certbot_0.40.0-1_all.deb ...
Unpacking certbot (0.40.0-1) ...
Setting up libnginx-mod-http-dav-ext (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-dav-e                                                           xt.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-dav-ext (--configure):
 installed libnginx-mod-http-dav-ext package post-installation script subprocess                                                            returned error exit status 1
Setting up libnginx-mod-http-fancyindex (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-fancy                                                           index.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-fancyindex (--configure):
 installed libnginx-mod-http-fancyindex package post-installation script subproc                                                           ess returned error exit status 1
Setting up libnginx-mod-http-headers-more-filter (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-heade                                                           rs-more-filter.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-headers-more-filter (--configur                                                           e):
 installed libnginx-mod-http-headers-more-filter package post-installation scrip                                                           t subprocess returned error exit status 1
Setting up libnginx-mod-http-upstream-fair (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-upstr                                                           eam-fair.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-upstream-fair (--configure):
 installed libnginx-mod-http-upstream-fair package post-installation script subp                                                           rocess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-uploadprogress (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-uploa                                                           dprogress.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-uploadprogress (--configure):
 installed libnginx-mod-http-uploadprogress package post-installation script sub                                                           process returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-auth-pam (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-auth-                                                           pam.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-auth-pam (--configure):
 installed libnginx-mod-http-auth-pam package post-installation script subproces                                                           s returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-geoip (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-geoip                                                           .conf': No such file or directory
dpkg: error processing package libnginx-mod-http-geoip (--configure):
 installed libnginx-mod-http-geoip package post-installation script subprocess r                                                           eturned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-nchan (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-nchan.conf                                                           ': No such file or directory
dpkg: error processing package libnginx-mod-nchan (--configure):
 installed libnginx-mod-nchan package post-installation script subprocess return                                                           ed error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-ndk (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/10-mod-http-ndk.c                                                           onf': No such file or directory
dpkg: error processing package libnginx-mod-http-ndk (--configure):
 installed libnginx-mod-http-ndk package post-installation script subprocess ret                                                           urned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-cache-purge (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-cache                                                           -purge.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-cache-purge (--configure):
 installed libnginx-mod-http-cache-purge package post-installation script subpro                                                           cess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-echo (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-echo.                                                           conf': No such file or directory
dpkg: error processing package libnginx-mod-http-echo (--configure):
 installed libnginx-mod-http-echo package post-installation script subprocess re                                                           turned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-subs-filter (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-subs-                                                           filter.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-subs-filter (--configure):
 installed libnginx-mod-http-subs-filter package post-installation script subpro                                                           cess returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up certbot                                                            (0.40.0-1) ...
Setting up libnginx-mod-http-perl (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-perl.                                                           conf': No such file or directory
dpkg: error processing package libnginx-mod-http-perl (--configure):
 installed libnginx-mod-http-perl package post-installation script subprocess re                                                           turned error exit status 1
No apport report written because MaxReports is reached already
                                                              Setting up libngin                                                           x-mod-http-geoip2 (1.18.0-0ubuntu1) ...
ln: failed to create symbolic link '/etc/nginx/modules-enabled/50-mod-http-geoip                                                           2.conf': No such file or directory
dpkg: error processing package libnginx-mod-http-geoip2 (--configure):
 installed libnginx-mod-http-geoip2 package post-installation script subprocess                                                            returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: dependency p                                                           roblems prevent configuration of libnginx-mod-http-lua:
 libnginx-mod-http-lua depends on libnginx-mod-http-ndk (= 1.18.0-0ubuntu1); how                                                           ever:
  Package libnginx-mod-http-ndk is not configured yet.

dpkg: error processing package libnginx-mod-http-lua (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency p                                                           roblems prevent configuration of nginx-extras:
 nginx-extras depends on libnginx-mod-http-auth-pam (= 1.18.0-0ubuntu1); however                                                           :
  Package libnginx-mod-http-auth-pam is not configured yet.
 nginx-extras depends on libnginx-mod-http-cache-purge (= 1.18.0-0ubuntu1); howe                                                           ver:
  Package libnginx-mod-http-cache-purge is not configured yet.
 nginx-extras depends on libnginx-mod-http-dav-ext (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-http-dav-ext is not configured yet.
 nginx-extras depends on libnginx-mod-http-echo (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-http-echo is not configured yet.
 nginx-extras depends on libnginx-mod-http-fancyindex (= 1.18.0-0ubuntu1); howev                                                           er:
  Package libnginx-mod-http-fancyindex is not configured yet.
 nginx-extras depends on libnginx-mod-http-geoip (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-http-geoip is not configured yet.
 nginx-extras depends on libnginx-mod-http-geoip2 (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-http-geoip2 is not configured yet.
 nginx-extras depends on libnginx-mod-http-headers-more-filter (= 1.18.0-0ubuntu                                                           1); however:
  Package libnginx-mod-http-headers-more-filter is not configured yet.
 nginx-extras depends on libnginx-mod-http-lua (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-http-lua is not configured yet.
 nginx-extras depends on libnginx-mod-http-perl (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-http-perl is not configured yet.
 nginx-extras depends on libnginx-mod-http-subs-filter (= 1.18.0-0ubuntu1); howe                                                           ver:
  Package libnginx-mod-http-subs-filter is not configured yet.
 nginx-extras depends on libnginx-mod-http-uploadprogress (= 1.18.0-0ubuntu1); h                                                           owever:
  Package libnginx-mod-http-uploadprogress is not configured yet.
 nginx-extras depends on libnginx-mod-http-upstream-fair (= 1.18.0-0ubuntu1); ho                                                           wever:
  Package libnginx-mod-http-upstream-fair is not configured yet.
 nginx-extras depends on libnginx-mod-nchan (= 1.18.0-0ubuntu1); however:
  Package libnginx-mod-nchan is not configured yet.

dpkg: error processing package nginx-extras (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing trigger                                                           s for man-db (2.9.1-1) ...
Errors were encountered while processing:
 libnginx-mod-http-dav-ext
 libnginx-mod-http-fancyindex
 libnginx-mod-http-headers-more-filter
 libnginx-mod-http-upstream-fair
 libnginx-mod-http-uploadprogress
 libnginx-mod-http-auth-pam
 libnginx-mod-http-geoip
 libnginx-mod-nchan
 libnginx-mod-http-ndk
 libnginx-mod-http-cache-purge
 libnginx-mod-http-echo
 libnginx-mod-http-subs-filter
 libnginx-mod-http-perl
 libnginx-mod-http-geoip2
 libnginx-mod-http-lua
 nginx-extras
E: Sub-process /usr/bin/dpkg returned an error code (1)
1 Like

Wait /etc/nginx/modules-enabled ? Isn't it sites-enabled?

Welcome to the Let's Encrypt Community, Dylan :slightly_smiling_face:

If you can, you would be a lot better off removing all existing certbot installs and using the snap installation.

3 Likes

It's both.

But as @griffin put it:

Step #1:
sudo apt remove certbot

2 Likes

OH, wow! I'll give these a shot! Thanks guys

2 Likes

You're welcome. Let us know how it goes. :blush:

1 Like

My god ...... it's so easy and straight-forward. I've been waiting for this moment.

3 Likes

We aim to please. If you have any questions or run into any more trouble, just let us know. :slightly_smiling_face:

1 Like