The requested apache plugin does not appear to be installed

Here’s what I noticed on an Ubuntu 19.04 machine that has been upgraded through several Ubuntu releases. At one point in time certbot had been installed in /usr/local/bin/certbot.

$ which certbot
/usr/local/bin/certbot

$ sudo apt install python-certbot-apache -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2 apache2-data apache2-utils certbot python-pyicu python3-acme python3-augeas python3-certbot python3-certbot-apache python3-configargparse python3-configobj
  python3-future python3-josepy python3-mock python3-parsedatetime python3-pbr python3-requests-toolbelt python3-zope.component python3-zope.event python3-zope.hookable
  python3-zope.interface
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom python3-certbot-nginx python-certbot-doc python-acme-doc python-certbot-apache-doc python-configobj-doc
  python-future-doc python-mock-doc
The following NEW packages will be installed:
  apache2 apache2-data apache2-utils certbot python-certbot-apache python-pyicu python3-acme python3-augeas python3-certbot python3-certbot-apache python3-configargparse
  python3-configobj python3-future python3-josepy python3-mock python3-parsedatetime python3-pbr python3-requests-toolbelt python3-zope.component python3-zope.event
  python3-zope.hookable python3-zope.interface
0 upgraded, 22 newly installed, 0 to remove and 21 not upgraded.
Need to get 1,656 kB of archives.
After this operation, 9,128 kB of additional disk space will be used.
....

$ certbot plugins
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot.plugins.standalone:Authenticator

* webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authenticator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

I then sudo rm -f /usr/local/bin/certbot, restarted my shell, and ran the following. This showed me exactly what I expected. Can both of you try that?

$ which certbot
/usr/bin/certbot

$ certbot plugins
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* apache
Description: Apache Web Server plugin
Interfaces: IAuthenticator, IInstaller, IPlugin
Entry point: apache = certbot_apache.entrypoint:ENTRYPOINT

* standalone
Description: Spin up a temporary webserver
Interfaces: IAuthenticator, IPlugin
Entry point: standalone = certbot.plugins.standalone:Authenticator

* webroot
Description: Place files in webroot directory
Interfaces: IAuthenticator, IPlugin
Entry point: webroot = certbot.plugins.webroot:Authenticator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2 Likes