Unexpected error DistributionNotFound: The zope.interface

The Basics

  • Nextcloud Server version (e.g., 29.x.x):

    • 32.0.8snap2
  • Operating system and version (e.g., Ubuntu 24.04):

    • Raspbian GNU/Linux 9
  • Web server and version (e.g, Apache 2.4.25):

    • Apache inside Nextcloud snap
  • Reverse proxy and version _(e.g. nginx 1.27.2)

    • Just the Apache inside the snap
  • PHP version (e.g, 8.3):

    • inside snap
  • Is this the first time you’ve seen this error? (Yes / No):

    • yes
  • When did this problem seem to first start?

    • today
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)

    • snap
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)

    • no

I am trying to install Nexcloud Snap as per Managing HTTP encryption (HTTPS) · nextcloud-snap/nextcloud-snap Wiki · GitHub

To get a Letsencrypt certificate, the command is:

sudo nextcloud.enable-https lets-encrypt

This did not work, but I found out that this does work:

sudo snap run nextcloud.enable-https lets-encrypt

The Certbot dialog starts, prompting for email and domain name. Then it runs into an error:

Attempting to obtain certificates... error running certbot:

An unexpected error occurred:
pkg_resources.DistributionNotFound: The 'zope.interface' distribution 
was not found and is required by the application
Please see the logfile '/tmp/tmptyzjk9yi/log' for more details.

The log file does not exist.

My question is how to fix the error about the zope.interface distribution.

Might there be a conflict with the two certbots, one installed from snap a long time ago and used for Nginx, certbot 5.6.0 “classic”, and the other one packaged inside the Nextcloud snap that I installed this week? How to fix this?

Hey @RolandKwee thanks for your request.

the error seems familiar and is mentioned here: Certbot is broken in Nextcloud snap 32.0.8snap3 on ARM64. · Issue #3461 · nextcloud-snap/nextcloud-snap but since been solved in 32.0.9snap1.

so its hard to find the reason you’re on 32.0.8snap2? unless it has something to do with “raspian” which is not officially supported for the snap mind you… OS requirements

is this an upgrade or a fresh install?

@pachulo and @christianlupus any ideas?

Thanks for your info! No this is a fresh install. At least you did not seem to object to my snap run fix. The snap version fix is to either wait for the next version, or to use a previous version. Also, I should try the Nextcloud installation on my other machine, a small PC. But I am leaving town for a few days, and will continue when I am back.

Hello,

it would be super useful to know your architecture (arm, amd, …). If possible just post the output of uname -a. This might be an architecture-dependent issue, as scubamuc mentioned.

Christian

Hi @RolandKwee !

You most likely are on an armhf OS, and I’m afraid that arch is not supported anymore by the nextcloud-snap since the upgrade to MySQL 8.4.

That would explain this:

  • Nextcloud Server version (e.g., 29.x.x):

    • 32.0.8snap2

No this is a fresh install.

The solution is to use an arm64 OS instead.