Other OS - Other Problem PHP/Python Problem on Install LibreNMS on Debian12

A new chance? on Debian 12 - fresh installed LibreNMS


Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.

Closed 1 hour ago.

The community is reviewing whether to reopen this question as of 11 mins ago.

I have a fresh installed debian12

I follow the install docs on this site: https://docs.librenms.org/Installation/Install-LibreNMS/

I run (unter the user librnms) the follow composer…

librenms@MYHOST:~$ ./scripts/composer_wrapper.php install --no-dev

I run in to a error with python3

**Error is:

scripts/dynamic_check_requirements.py || pip3 install --user -r requirements.txt || : error: externally-managed-environment

At “requirements.txt” I found:

PyMySQL!=1.0.0
python-dotenv
redis>=4.0
setuptools
psutil>=5.9.6
command_runner>=1.3.0

“apt tells me”:

python3 ist schon die neueste Version (3.11.2-1+b1).

I have also python3-full and the pipx pre installed

I have no idea what’s missing from python. How can I find out? Or does anyone here know what’s missing? Thanks in advance.

I have also python3-full and the pipx pre installed.

I have read the *.md files (install on /opt/libenms/doc/

I have also Debian 12 with LibreNMS and i run sudo pip3 install -–break-system-packages -r /opt/librenms/requirements.txt to install python packages.
Maybe it’s not recommended (–break-system-packages)soluton but it work for me.

Good Monig & Thanks fpr your Help,

if i check the “missing” parts, se bellow
Hint: i can’t find (pip) command_runner

maybe a source is missing?

cat /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 12.11.0 Bookworm - Official amd64 NETINST with firmware 20250517-09:51]/ bookworm contrib main non-free-firmware

deb Index of /debian bookworm main non-free-firmware
deb-src Index of /debian bookworm main non-free-firmware

deb Index of /debian-security bookworm-security main non-free-firmware
deb-src Index of /debian-security bookworm-security main non-free-firmware

$USER@$MYSVR:~$ sudo pip3 install -–break-system-packages -r /opt/librenms/requirements.txt
[sudo] Passwort für $USER:

Usage:
pip3 install [options] [package-index-options] …
pip3 install [options] -r [package-index-options] …
pip3 install [options] [-e] …
pip3 install [options] [-e] …
pip3 install [options] <archive url/path> …

no such option: -–
$USER@$MYSVR:~$ sudo cat /opt/librenms/requirements.txt
PyMySQL!=1.0.0
python-dotenv
redis>=4.0
setuptools
psutil>=5.9.6
command_runner>=1.3.0
$USER@$MYSVR:~$ sudo pip3 install PyMySQL
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.

$USER@$MYSVR:~$ sudo apt install python3-pymysql
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
python3-pymysql ist schon die neueste Version (1.0.2-2+deb12u1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

$USER@$MYSVR:~$ sudo apt install python3-dotenv
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
python3-dotenv ist schon die neueste Version (0.21.0-1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

$USER@$MYSVR:~$ sudo apt install python3-redis
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
python3-redis ist schon die neueste Version (4.3.4-3).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

$USER@$MYSVR:~$ sudo apt install python3-setuptools
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
python3-setuptools ist schon die neueste Version (66.1.1-1+deb12u2).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

$USER@$MYSVR:~$ sudo apt install python3-psutil
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
python3-psutil ist schon die neueste Version (5.9.4-1+b1).
python3-psutil wurde als manuell installiert festgelegt.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.

$USER@$MYSVR:~$ sudo apt install python3-com
python3-comedilib python3-commando python3-commonmark python3-compizconfig python3-compyle
python3-comm python3-commentjson python3-commonmark-bkrs python3-compreffor

You have python3-pip package already installed. Problem is with arguments. Maybe copy and paste make some weird chars. you need to put double minus (-) sign as it is mention in note that you get after command sudo pip3 install PyMySQL

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.

WOW, it’s Up & running!

BIG THANKS!

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