Earlier today I did a fresh install (via rebuild droplet on Digital Ocean) to Umbuntu 18.04 x64 while following the steps of the v.40 upgrade guide (link).
The initial install of mailinabox went fine. The duplicity restore went fine. However I got an error on sudo mailinabox
(also same result with curl method). The error occurred right after the management daemon message:
Installing Mail-in-a-Box system management daemon...
FAILED: /usr/local/lib/mailinabox/env/bin/pip install --upgrade pip
-----------------------------------------
setup/functions.sh: line 17: /usr/local/lib/mailinabox/env/bin/pip: No such file or directory
-----------------------------------------
After digging for a while I found that the cause is something about the way virtualenv is being done in the management.sh script. When I looked in /usr/local/lib/mailinabox/env/bin I found with names like =2.0.0 (sorry I didnt retain the terminal session to obtain the actual names but they did have = in them).
Resolution:
In case others get stumped by the issue too, below are the steps I used to resolve it. I’m really don’t know why this worked and the script didn’t.
-
Remove /usr/local/lib/mailinabox/env
rm -rf /usr/local/lib/mailinabox/env
-
Manually create the virtualenv (these commands assume you are already in the folder /usr/local/lib/mailinabox):
source env/bin/activate
pip install --upgrade pip
pip install --upgrade rtyaml "email_validator>=1.0.0" "exclusiveprocess" \
> flask dnspython python-dateutil \
> "idna>=2.0.0" "cryptography==2.2.2" boto psutil
deactivate
-
Comment out the lines in ~mailinabox/setup/management.sh that create and install packages in the virtualenv. You’ll need to leave two lines in the top section of the file (
inst_dir=/usr/local/lib/mailinabox
andvenv=$inst_dir/env
) as commands later in the file use them too -
Run
sudo mailinabox
and it will make it all the way through without error.
Good luck!