Comments (28)
Okay, after a quick review, the tl;dr version is, if you add this to your environment it should fix how the venv is being built:
export DEB_PYTHON_INSTALL_LAYOUT='deb'
The setup script only appears to build the virtualenv if the directory is missing, so you will need to first remove that venv directory, /usr/local/lib/mailinabox/venv
, before re-running the install. And if you're using sudo
to run mailinabox, make sure that the environment variable is being preserved by using the --preserve-env
option.
from mailinabox.
Great sleuthing! We'll set this environment variable automatically in the next Mail-in-a-Box update (see 371f5bc).
from mailinabox.
I tried everything I could think of last night. This morning, I tried a bare metal install, no updates, ran #export DEB_PYTHON_INSTALL_LAYOUT='deb' prior to any command, then ran the install, #sudo apt install curl locales -y #sudo dpkg-reconfigure locales #sudo curl -L https://power-mailinabox.net/setup.sh | sudo bash
and this happens...still....
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Installing nsd (DNS server)... Generating DNSSEC signing keys... No keypair found. Generating daemon's PGP keypair... Generated key with fingerprint 9288A8DBC35E8C7CB22A63940AB01FD56FF954BC Installing Postfix (SMTP server)... Installing Dovecot (IMAP server)... Creating new user database: /home/user-data/mail/users.sqlite Installing OpenDKIM/OpenDMARC... Installing SpamAssassin... Installing Nginx (web server)... Installing Roundcube (webmail)... Installing Nextcloud (contacts/calendar)...
Upgrading to Nextcloud version 24.0.7
Nextcloud is already latest version photos 1.6.0 disabled dashboard 7.4.0 disabled activity 2.16.0 disabled Installing Z-Push (Exchange/ActiveSync server)... 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
you should run with the option --preserve-env
#sudo --preserve-env curl -L https://power-mailinabox.net/setup.sh | sudo --preserve-env bash
in my case it was like this:
$ export DEB_PYTHON_INSTALL_LAYOUT='deb'
$ sudo --preserve-env curl -s https://mailinabox.email/setup.sh | sudo -E bash
from mailinabox.
Quick note if still getting error - /usr/local/lib/mailinabox/env/bin/pip: No such file or directory
- Set the Environment Variable:
export DEB_PYTHON_INSTALL_LAYOUT='deb' - . Remove the Existing Virtual Environment:
sudo rm -r /usr/local/lib/mailinabox/env - sudo --preserve-env curl -s https://mailinabox.email/setup.sh | sudo -E bash
These 3 steps should run the installation without errors
from mailinabox.
I've just set the env var on a fresh machine ( didn't even run apt update
or apt upgrade
) and it worked 😄
export DEB_PYTHON_INSTALL_LAYOUT='deb'
Thanks @dms00 for the suggestion 😄
from mailinabox.
It is still failing for me. I tried the solutions proposed
export DEB_PYTHON_INSTALL_LAYOUT= 'deb'
sudo --preserve-env curl -L https://power-mailinabox.net/setup.sh | sudo --preserve-env bash
Still fails at
Installing Z-Push (Exchange/ActiveSync server)...
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
Can't install Mailinabox on Ubuntu 22.04
from mailinabox.
Just as a quick note for people trying the above mentioned fix.
You need to run the command before anything else, otherwise it wont work.
So, get a VM, connect, run export DEB_PYTHON_INSTALL_LAYOUT='deb'
, then as second step, run sudo --preserve-env curl -s https://mailinabox.email/setup.sh | sudo -E bash
.
from mailinabox.
Remove Current Python Enviroment and then re create it and try running the script again. Worked for me
rm -rf /usr/local/lib/mailinabox/env >> REMOVE ENVIROMENT
apt install python3.10-venv >> DOWNLOAD VENV
python3 -m venv /usr/local/lib/mailinabox/env >> CREATE NEW VIRTUAL ENV
Run the Script Again, It definitely should work, i updated 5 mail servers all of them faced this problem and i fixed all of them like this.
from mailinabox.
+1 breaking here with the exact steps and errors. Seems the same as in #2272 but with no solution so no clues
from mailinabox.
There is some discussion here that seems to describe the same issue. However, I would first like to get some additional information, like:
- Did you get a fresh Ubuntu 22.04 VPS? Or upgrade an existing one?
- How did you install the system, which command are you using?
- There might be a VPS specific issue. Which provider are you using?
Instead of changing code, could you post the original issues (errors, messages, installation output etc) you're facing?
from mailinabox.
Exactly same problem for me:
- Fresh 22.04 install using ubuntu-22.04.3-live-server-amd64.iso
- command launched: curl -s https://mailinabox.email/setup.sh | sudo -E bash
- output:
...
Successfully uninstalled click-8.0.3
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.
- I'm providing VPS, so not a provider problem
from mailinabox.
There is some discussion here that seems to describe the same issue. However, I would first like to get some additional information, like:
* Did you get a fresh Ubuntu 22.04 VPS? Or upgrade an existing one? * How did you install the system, which command are you using? * There might be a VPS specific issue. Which provider are you using?
Instead of changing code, could you post the original issues (errors, messages, installation output etc) you're facing?
Hey @kiekerjan 👋
Thanks for the reply. It's a fresh install on contabo ( vps host ). Contabo is the one that allows for SMTP. hence using that, if anyone has any other better alternatives, I am all ears 😄
from mailinabox.
To make things work quickly I removed blinker (dpkg -r python3-blinker) and its associated packages, and it worked. Definitively not the ideal method, but good enough for now and for my needs.
from mailinabox.
The code in management.sh hasn't changed in many years, and I've confirmed that the paths are correct on my MiaB Ubuntu 22.04. So, I believe the issue is, why did virtualenv
create the python venv with everything under local/bin
instead of bin
on the affected systems?
I found this with a quick google search, maybe it will help you to resolve the issue:
https://askubuntu.com/questions/1406304/virtualenv-installs-envs-into-local-bin-instead-of-bin
from mailinabox.
This worked for me, adding the env var as per @dms00
export DEB_PYTHON_INSTALL_LAYOUT='deb'
from mailinabox.
Thanks for the feedback. Glad it worked.
I didn't have any way to test this fix because I cannot reproduce this problem on my MiaB server. So, there's more going on here than I understand at this point.
from mailinabox.
This comment from the "askubuntu.com" link I posted seems to be crucial:
![Screenshot 2023-11-27 at 19 46 37](https://private-user-images.githubusercontent.com/10622016/286114447-f606210b-e872-4527-97e5-8fb7eb8c2a0d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkzNTIyMzMsIm5iZiI6MTcxOTM1MTkzMywicGF0aCI6Ii8xMDYyMjAxNi8yODYxMTQ0NDctZjYwNjIxMGItZTg3Mi00NTI3LTk3ZTUtOGZiN2ViOGMyYTBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI1VDIxNDUzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNkMDMyNjM2NzdjMDA0ODMzYzYwNjEyZDgzMmFmMjkxMmNmYTZiMTlkNjA1MDIyZWVmZTI5YTIwOGFkYWRmYmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.97I76prCYBxKWHublJKSONBQn4JzYtmzUR_dFqf_na4)
Could someone who has this problem on their system, please check if you have python3-distutils installed on your system? And if you do not, please install it and see if that resolves the issue.
from mailinabox.
My bad luck, tonight I decided to test installing mailinabox on a fresh Ubuntu 22.04 (LTS) x64 Digital Ocean instance and have run into the above error. Python3-distutils version 3.10.8-1~22.04 does appear to be installed:
sudo apt-get install python3-distutils
python3-distutils is already the newest version (3.10.8-1~22.04).
dpkg -S python3-distutils
python3-distutils: /usr/share/lintian/overrides/python3-distutils
python3-distutils: /usr/share/doc/python3-distutils/copyright
python3-distutils: /usr/share/doc/python3-distutils
python3-distutils: /usr/share/doc/python3-distutils/changelog.Debian.gz
python3-distutils: /usr/share/doc/python3-distutils/README.Debian
Edit: the instructions to "export DEB_PYTHON_INSTALL_LAYOUT='deb'" fixed the crash.
from mailinabox.
Hey Everyone 👋
Thanks for helping resolve the issue.
@kiekerjan I had a look at your fork, I see a lot of improvements there. Thanks for maintaining it.
from mailinabox.
@dms00 suggestion worked like a charm, thanks mate !
export DEB_PYTHON_INSTALL_LAYOUT='deb'
from mailinabox.
Closing this issue for now.
from mailinabox.
But maybe it should be at least documented somehow? I yesterday also stuck with it and the above solution worked. But it looks like a workaround and not a robust solution.
from mailinabox.
And depending on the cause we might want to include a code change to management.sh
from mailinabox.
I tried everything I could think of last night.
This morning, I tried a bare metal install, no updates, ran
#export DEB_PYTHON_INSTALL_LAYOUT='deb'
prior to any command, then ran the install,
#sudo apt install curl locales -y
#sudo dpkg-reconfigure locales
#sudo curl -L https://power-mailinabox.net/setup.sh | sudo bash
and this happens...still....
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Installing nsd (DNS server)...
Generating DNSSEC signing keys...
No keypair found. Generating daemon's PGP keypair...
Generated key with fingerprint 9288A8DBC35E8C7CB22A63940AB01FD56FF954BC
Installing Postfix (SMTP server)...
Installing Dovecot (IMAP server)...
Creating new user database: /home/user-data/mail/users.sqlite
Installing OpenDKIM/OpenDMARC...
Installing SpamAssassin...
Installing Nginx (web server)...
Installing Roundcube (webmail)...
Installing Nextcloud (contacts/calendar)...
Upgrading to Nextcloud version 24.0.7
Nextcloud is already latest version
photos 1.6.0 disabled
dashboard 7.4.0 disabled
activity 2.16.0 disabled
Installing Z-Push (Exchange/ActiveSync server)...
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
from mailinabox.
--= THIS WORKED FOR ME==--
(subject: stand alone pc, with Ubuntu server 22.04 loaded from downloaded image from 11-27-23, no other commands given from first boot other than changing the root password)
#export DEB_PYTHON_INSTALL_LAYOUT='deb'
#sudo --preserve-env curl -L https://power-mailinabox.net/setup.sh | sudo --preserve-env bash
Thank you all.
from mailinabox.
After a "successful installation", I get a new error on the Admin Backup page.
[Errno 2] No such file or directory: '/usr/local/bin/duplicity'
from mailinabox.
Hello
I have the same issue. I try the work arround with --preserve and that's not better.
I'm starting from a fresh install, nothing on the vps , I try with an apt update or from scratch and the issue always occur.
I also try to create a virtual link to pip as it works fine (if I try "pip install --upgrade pip", it s ok, thats only the path who is wrong) , but its another fail. There is a fix or a previous stable release I can try ?
If i relanch the script after a sudo --preserve-env pip install --upgrade pip
I got this new error information :
Installing Mail-in-a-Box system management daemon...
FAILED: /usr/local/lib/mailinabox/env/bin/pip install --upgrade pip
setup/functions.sh: line 19: /usr/local/lib/mailinabox/env/bin/pip: No such file or directory
- connect to 0.0.0.60 port 80 failed: Connection timed out
- Failed to connect to 0.0.0.60 port 80 after 129901 ms: Connection timed out
- Closing connection 1
from mailinabox.
I just repeated the experiment...baremetal...tried Ubuntu server 23...but Dave hasn't addressed 23 yet...so, I loaded Ubuntu Server 20.04
Only commands given prior to installation was to change the root password.
I ran the standard install procedure, and everything appears to be working just fine...seems that Jammy just broke itself. Bummer.
So, at lease I have an option. ( I have a large project where I will be loading up a few dozen iterations of PMIAB..so I was about to panic.)
I have run all updates, and nothing appears broken.
from mailinabox.
Related Issues (20)
- owncloud-unlockadmin.sh has incorrect path for mail.py HOT 5
- Backup: File size can't be validated, because of missing capabilities of the backend HOT 6
- freebsd support HOT 2
- active-sync is with imap, or with mapi HOT 2
- Multiple Domain why change NS ?? HOT 3
- Feature request: Add the ability for parked domain email user to edit it's own DNS records in the control panel HOT 1
- Mailinabox V68 when connecting with /mail or /cloud receiving 502 Bad Gateway and Android clients force to verify email address again.
- SSH System Status Check Error HOT 1
- remove unecessary subdomains HOT 1
- `mail_log.py` issue HOT 1
- MIAB Maintenance / Restore Documentation for S3 could be enhanced to avoid confusion
- Readme.md doesn't include database information HOT 1
- mail in a box backup
- Add support for Proxied (Cloudflare) and DDNS web records HOT 10
- Another run at Dockerifying MIAB
- When should a GitHub issue be opened for the Mail-in-a-Box project? HOT 3
- Better domain management HOT 2
- Upgrade PHP from v8.0 to v8.1
- Upgrade Nextcloud to latest v27 HOT 7
- Apply small Nextcloud upgrade to 26.0.13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailinabox.