Error with V62 upgrade

Hello,
I am attempting to upgrade to .62. The upgrade seems to go perfectly well until until it attempts to install the management daemon when it tells me there is a .cache directory access error, and it fails on attempting to uninstall ‘blinker’. I have checked the permissions on the .cache directory which are rwx to the current user (ubuntu) as expected (0700).

Below is a copy of the session:

Mail-in-a-Box Version: v62

Updating system packages…
Installing system packages…
Initializing system random number generator…
Firewall is active and enabled on system startup
Synchronizing state of fail2ban.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable fail2ban
Installing nsd (DNS server)…
Installing Postfix (SMTP server)…
Installing Dovecot (IMAP server)…
Installing OpenDKIM/OpenDMARC…
Installing SpamAssassin…
Installing Nginx (web server)…
Installing Roundcube (webmail)…
wal
Installing Nextcloud (contacts/calendar)…
Nextcloud is already latest version
Installing Z-Push (Exchange/ActiveSync server)…
Installing Mail-in-a-Box system management daemon…

FAILED: /usr/local/lib/mailinabox/env/bin/pip install --upgrade rtyaml email_validator>=1.0.0 exclusiveprocess flask dnspython python-dateutil expiringdict gunicorn qrcode[pil] pyotp idna>=2.0.0 cryptography==37.0.2 psutil postfix-mta-sts-resolver b2sdk boto3

WARNING: The directory ‘/home/ubuntu/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo’s -H flag.
Requirement already satisfied: rtyaml in /usr/local/lib/python3.10/dist-packages (1.0.0)
Requirement already satisfied: email_validator>=1.0.0 in /usr/local/lib/python3.10/dist-packages (2.0.0.post2)
Requirement already satisfied: exclusiveprocess in /usr/local/lib/python3.10/dist-packages (0.9.4)
Requirement already satisfied: flask in /usr/local/lib/python3.10/dist-packages (2.2.2)
Collecting flask
Downloading Flask-2.3.2-py3-none-any.whl (96 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.9/96.9 kB 2.2 MB/s eta 0:00:00
Requirement already satisfied: dnspython in /usr/local/lib/python3.10/dist-packages (2.3.0)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.10/dist-packages (2.8.2)
Requirement already satisfied: expiringdict in /usr/local/lib/python3.10/dist-packages (1.2.2)
Requirement already satisfied: gunicorn in /usr/local/lib/python3.10/dist-packages (20.1.0)
Requirement already satisfied: qrcode[pil] in /usr/local/lib/python3.10/dist-packages (7.4.2)
Requirement already satisfied: pyotp in /usr/local/lib/python3.10/dist-packages (2.8.0)
Requirement already satisfied: idna>=2.0.0 in /usr/local/lib/python3.10/dist-packages (3.4)
Requirement already satisfied: cryptography==37.0.2 in /usr/local/lib/python3.10/dist-packages (37.0.2)
Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (5.9.5)
Requirement already satisfied: postfix-mta-sts-resolver in /usr/local/lib/python3.10/dist-packages (1.1.5)
Collecting postfix-mta-sts-resolver
Downloading postfix_mta_sts_resolver-1.3.0-py3-none-any.whl (28 kB)
Requirement already satisfied: b2sdk in /usr/local/lib/python3.10/dist-packages (1.21.0)
Requirement already satisfied: boto3 in /usr/local/lib/python3.10/dist-packages (1.26.137)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography==37.0.2) (1.15.1)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from rtyaml) (5.4.1)
Requirement already satisfied: Werkzeug>=2.3.3 in /usr/local/lib/python3.10/dist-packages (from flask) (2.3.4)
Requirement already satisfied: Jinja2>=3.1.2 in /usr/local/lib/python3.10/dist-packages (from flask) (3.1.2)
Requirement already satisfied: itsdangerous>=2.1.2 in /usr/local/lib/python3.10/dist-packages (from flask) (2.1.2)
Requirement already satisfied: click>=8.1.3 in /usr/local/lib/python3.10/dist-packages (from flask) (8.1.3)
Collecting blinker>=1.6.2 (from flask)
Downloading blinker-1.6.2-py3-none-any.whl (13 kB)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil) (1.16.0)
Requirement already satisfied: setuptools>=3.0 in /usr/lib/python3/dist-packages (from gunicorn) (59.6.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from qrcode[pil]) (4.4.0)
Requirement already satisfied: pypng in /usr/local/lib/python3.10/dist-packages (from qrcode[pil]) (0.20220715.0)
Requirement already satisfied: pillow>=9.1.0 in /usr/local/lib/python3.10/dist-packages (from qrcode[pil]) (9.3.0)
Requirement already satisfied: aiodns>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from postfix-mta-sts-resolver) (3.0.0)
Requirement already satisfied: aiohttp>=3.4.4 in /usr/local/lib/python3.10/dist-packages (from postfix-mta-sts-resolver) (3.8.3)
Requirement already satisfied: logfury<2.0.0,>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from b2sdk) (1.0.1)
Requirement already satisfied: requests<3.0.0,>=2.9.1 in /usr/lib/python3/dist-packages (from b2sdk) (2.25.1)
Requirement already satisfied: tqdm<5.0.0,>=4.5.0 in /usr/local/lib/python3.10/dist-packages (from b2sdk) (4.64.1)
Requirement already satisfied: botocore<1.30.0,>=1.29.137 in /usr/local/lib/python3.10/dist-packages (from boto3) (1.29.137)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from boto3) (1.0.1)
Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from boto3) (0.6.0)
Requirement already satisfied: pycares>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from aiodns>=1.1.1->postfix-mta-sts-resolver) (4.3.0)
Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (21.2.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (2.1.1)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (6.0.3)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (4.0.2)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (1.8.2)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (1.3.3)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp>=3.4.4->postfix-mta-sts-resolver) (1.3.1)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in /usr/lib/python3/dist-packages (from botocore<1.30.0,>=1.29.137->boto3) (1.26.5)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography==37.0.2) (2.21)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from Jinja2>=3.1.2->flask) (2.1.1)
Installing collected packages: blinker, flask, postfix-mta-sts-resolver
Attempting uninstall: blinker
Found existing installation: blinker 1.4
ERROR: Cannot uninstall ‘blinker’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

systemprompt:~$

Any help would be appreciated! I have tried rebooting and running the install script after the reboot, but the error repeats. The box seems to function alright, but status checks show V61.1.

Ed

I am getting the same error.

I upgraded a few hours ago and the upgrade went fine. No errors at all. So the problem is not from the MiaB end. It’s something else.

I received the same error and doing the following worked for me:

Check for the blinker package

sudo apt list python*blinker*

remove it through apt

sudo apt remove python3-blinker

run the command that Mail-in-a-Box setup uses to update the packages via pip (it’s a long one all on one line)

sudo /usr/local/lib/mailinabox/env/bin/pip install --upgrade rtyaml "email_validator>=1.0.0" "exclusiveprocess" flask dnspython python-dateutil expiringdict gunicorn 	qrcode[pil] pyotp "idna>=2.0.0" "cryptography==37.0.2" psutil postfix-mta-sts-resolver b2sdk boto3

re-run Mail-in-a-Box setup.

Just out of curiosity, I had Python and Pip errors that I had to manually resolve when moving to v60/v61, and I’m pretty sure this is related to that for me. Wish I documented what it was exactly. Did you experience anything strange when moving as well?

2 Likes

Thanks, this was the key for me.

Thank you matidau, your suggestion worked for me as well!

I upgraded to 60.1/Ubuntu 22 “in-place” following the directions by mouse on the upgrade thread. Perhaps this is arising from that? Anyway, I appreciate your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.