umbrel
umbrel copied to clipboard
error: externally-managed-environment
I was trying to install umbrel using the cURL that was on the web page. I always get this error.
I tried everything. I am using ubuntu server
I tried ubuntu desktop, xubuntu. Same error. Install and create new python environments
I would like to get help.
bash
curl -L https://umbrel.sh | bash --debug
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 41 100 41 0 0 84 0 --:--:-- --:--:-- --:--:-- 84
100 7541 100 7541 0 0 10686 0 --:--:-- --:--:-- --:--:-- 10686
About to install Umbrel in "/home/alebogado/umbrel".
If you would like to install somewhere else you can specify a custom location with:
curl -L https://umbrel.sh | bash -s -- --install-path /some/path
Waiting for 10 seconds...
You may press Ctrl+C now to abort the install.
It looks like you already have Docker installed. Umbrel requires a modern version of Docker so this script will update them with the official Docker install script.
If you would like to disable this behaviour you can abort this install and run again with --no-install-docker or --no-install-compose.
You can pass flags to the installer like this:
curl -L https://umbrel.sh | bash -s -- --no-install-docker --no-install-compose
Waiting for 30 seconds...
You may press Ctrl+C now to abort the install.
Hit:1 http://ar.archive.ubuntu.com/ubuntu lunar InRelease
Get:2 http://ar.archive.ubuntu.com/ubuntu lunar-updates InRelease [90.7 kB]
Hit:3 http://ar.archive.ubuntu.com/ubuntu lunar-backports InRelease
Get:4 http://ar.archive.ubuntu.com/ubuntu lunar-security InRelease [90.7 kB]
Hit:5 https://download.docker.com/linux/ubuntu lunar InRelease
Fetched 181 kB in 2s (98.5 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
fswatch is already the newest version (1.14.0+repack-13.1).
jq is already the newest version (1.6-2.1ubuntu3).
rsync is already the newest version (3.2.7-1).
curl is already the newest version (7.88.1-8ubuntu1).
git is already the newest version (1:2.39.2-1ubuntu1.1).
gettext-base is already the newest version (0.21-11).
python3 is already the newest version (3.11.2-1).
gnupg is already the newest version (2.2.40-1.1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
avahi-daemon is already the newest version (0.8-6ubuntu1).
avahi-discover is already the newest version (0.8-6ubuntu1).
libnss-mdns is already the newest version (0.15.1-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 9922k 100 9922k 0 0 4018k 0 0:00:02 0:00:02 --:--:-- 9632k
yq installed successfully...
# Executing docker install script, commit: a8a6b338bdfedd7ddefb96fe3e7fe7d4036d945a
Warning: the "docker" command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sh -c echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu lunar stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
Version: 23.0.5
API version: 1.42
Go version: go1.19.8
Git commit: bc4487a
Built: Wed Apr 26 16:19:54 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 23.0.5
API version: 1.42 (minimum version 1.12)
Go version: go1.19.8
Git commit: 94d3ad6
Built: Wed Apr 26 16:19:54 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.20
GitCommit: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc:
Version: 1.1.5
GitCommit: v1.1.5-0-gf19387a
docker-init:
Version: 0.19.0
GitCommit: de40ad0
================================================================================
To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:
dockerd-rootless-setuptool.sh install
Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.
To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/
WARNING: Access to the remote API on a privileged Docker daemon is equivalent
to root access on the host. Refer to the 'Docker daemon attack surface'
documentation for details: https://docs.docker.com/go/attack-surface/
================================================================================
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pip is already the newest version (23.0.1+dfsg-1).
libffi-dev is already the newest version (3.4.4-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Requirement already satisfied: pip in ./homelab/lib/python3.11/site-packages (23.1.2)
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
same here. Ubuntu 23.04 on Raspberry Pi. I tried to install with the script and I get the same error.
I am thinking of installing the previous version of ubuntu server, the LTS version, I do it and I leave it here.
Solved with ubuntu LTS 22
ne fonctionne pas sur debian 12, même erreur
Still doesn't work on Debian 12 because of the same error: `error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.`
Same here - debian 12, fresh install, using curl script to install Umbrel leads to error: externally-managed-environment
I got this to work in Debian 12 by doing the following:
- Copy the contents of the umbrel install script used in the install command
curl -L https://umbrel.sh | bash
command from the repo over here - Paste said contents and save the file as
umbrel-install.sh
on your Debian machine - In the original code, lines 153-157 needs editing as follows. I've commented the lines that are preventing pip from installing packages due to the problems with the new PEP668 proposal and used
pipx
instead.
install_docker_compose() {
#sudo apt-get install --yes python3-pip libffi-dev
# We need to upgrade pip (via itself) because old pip versions in some OS repos fail to install deps.
#python3 -m pip install --upgrade pip
#sudo python3 -m pip install docker-compose
sudo apt-get install --yes pipx libffi-dev
sudo pipx install docker-compose
# Add /root/.local/bin to the path
echo PATH="\$PATH:/root/.local/bin" | sudo tee -a /root/.bashrc > /dev/null
sudo source /root/.bashrc
}
- Save file and give it execute permissions:
chmod +x umbrel-install.sh
- Now run the following to see a fresh, clean install:
bash umbrel-install.sh --bootstrapped
Note: You need to pass the --bootstrapped
argument else the script will pull the install script from the main umbrel repository which, clearly, does not have this modified install_docker_compose()
method.
On my Debian 12 machine the sudo source /root/.bashrc
command I modified failed but I think that's more a failing that my root user doesn't have a proper bash shell. If you get an error like can't find source:
when you run the script then you can replace this: sudo source /root/.bashrc
with this: sudo sh . /root/.bashrc
as this will load a shell and update the profile.
For a workaround I found this one the easiest way:
- Run the command (this will add all the repos needed)
curl -L https://umbrel.sh | bash
- After the error manually install Docker and docker-compose:
sudo apt install docker docker-compose
- Install Umbrel without docker:
curl -L https://umbrel.sh | bash -s -- --no-instal-docker --no-install-compose
That's it.
the error keeps repeating, we should open the issue again
It was fixed in #1780, and then Umbrel v1 was released. I think the issue is fixed, mark the issue as closed again.