Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installs additional packages to your container... #86

Closed
Bodengriller opened this issue Mar 28, 2020 · 3 comments
Closed

Installs additional packages to your container... #86

Bodengriller opened this issue Mar 28, 2020 · 3 comments

Comments

@Bodengriller
Copy link

Die Installation zusätzlicher Pakete über die ENV-Variable PACKAGES funktioniert (bei mir) nicht richtig.

Ich brauche für den MIHOME-VACUUM-Adapter folgende Pakete:
build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
Diese habe ich in der PACKAGES-Variable eingetragen (mit Leerzeichen getrennt).

Nachdem der Container hochgefahren ist, kann ich über die Container-Konsole folgendes versuchen:
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

und bekomme folgende Ausgabe:

root@iobroker:/opt/iobroker# sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libcairo2-dev
E: Unable to locate package libpango1.0-dev
E: Couldn't find any package by glob 'libpango1.0-dev'
E: Couldn't find any package by regex 'libpango1.0-dev'
E: Unable to locate package libjpeg-dev
E: Unable to locate package libgif-dev
E: Unable to locate package librsvg2-dev

führe ich direkt danach ein
sudo apt-get update
aus und wiederhole
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
werden die Pakete korrekt installiert.

Logischerweise sind diese dann beim nächsten Neustart des Containers wieder weg.

Der Container läuft auf einem RaspberryPi 4 im Docker
Was mache ich falsch?

@buanet
Copy link
Owner

buanet commented Mar 30, 2020

Hallo,
leider sehe ich weder dein Container-Log noch irgendwelche Details zu deinem Container.
Ich nutze die ENV PACKAGES auch und habe auch in der aktuellen Version keinerlei Probleme damit. Ist auch das erste Mal dass ich höre, dass es an dieser Stelle Probleme gibt.

Logischerweise sind diese dann beim nächsten Neustart des Containers wieder weg.

Das halte ich allerdings nur für die halbe Wahrheit. Ein einfacher Neustart des Containers lässt keine Pakete verschwinden. Das geschieht nur, wenn du den Container neu anlegst (z.b. copy/ edit oder recreate).

Zum Glück lasse ich beim Installieren der Packages ein Logfile erstellen. Schau doch bitte dort mal rein: /opt/scripts/setup_packages.log

MfG,
André

@Bodengriller
Copy link
Author

Hallo und danke für die Antwort.

Das geschieht nur, wenn du den Container neu anlegst
Ich meinte natürlich ein Rebuild/Recreat des Containers, sry

Ich habe den Container jetzt nochmal recreated (über Portainer) - das aktuell verwendete image ist von heute: 2020-03-30 14:12:46

Container-Log:

 ,
------------------------------------------------------------,
-----         Step 1 of 5: Preparing container         -----,
------------------------------------------------------------,
 ,
Installing additional packages is set by ENV.,
The following packages will be installed: vi build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev...,
Done.,
 ,
There are no changes in UID/ GID needed.,
 ,
------------------------------------------------------------,
-----   Step 2 of 5: Detecting ioBroker installation   -----,
------------------------------------------------------------,
 ,
Existing installation of ioBroker detected in /opt/iobroker.,
 ,
------------------------------------------------------------,
-----   Step 3 of 5: Checking ioBroker installation    -----,
------------------------------------------------------------,
 ,
(Re)Setting folder permissions (This might take a while! Please be patient!)...,
Done.,
 ,
Fixing "sudo-bug" by replacing sudo in iobroker with gosu...,
Done.,
 ,
------------------------------------------------------------,
-----      Step 4 of 5: Applying special settings      -----,
------------------------------------------------------------,
 ,
Some adapters have special requirements/ settings which can be activated by the use of environment variables.,
For more information take a look at readme.md on Github!,
 ,
Adminport set by ENV does not match port configured in ioBroker installation.,
Setting Adminport to 8081...,
New port for "admin.0" is: 8081,
Instance settings for "admin.0" are changed.,
Done.,
 ,
------------------------------------------------------------,
-----          Step 5 of 5: ioBroker startup           -----,
------------------------------------------------------------,
 ,
Starting ioBroker...,
 ,
host.iobroker check instance "system.adapter.admin.0" for host "iobroker",
host.iobroker check instance "system.adapter.discovery.0" for host "iobroker",
host.iobroker check instance "system.adapter.history.0" for host "iobroker",
host.iobroker check instance "system.adapter.rpi2.0" for host "iobroker",
host.iobroker check instance "system.adapter.node-red.0" for host "iobroker",
host.iobroker check instance "system.adapter.telegram.0" for host "iobroker",
host.iobroker check instance "system.adapter.javascript.0" for host "iobroker",
host.iobroker check instance "system.adapter.web.0" for host "iobroker",
host.iobroker check instance "system.adapter.vis.0" for host "iobroker",
host.iobroker check instance "system.adapter.mqtt-client.0" for host "iobroker",
host.iobroker check instance "system.adapter.info.0" for host "iobroker",
host.iobroker check instance "system.adapter.vis-jqui-mfd.0" for host "iobroker",
host.iobroker check instance "system.adapter.telegram.1" for host "iobroker",
host.iobroker check instance "system.adapter.ping.0" for host "iobroker",
host.iobroker check instance "system.adapter.mihome-vacuum.0" for host "iobroker",
host.iobroker check instance "system.adapter.fb-checkpresence.0" for host "iobroker",
host.iobroker check instance "system.adapter.vis-hqwidgets.0" for host "iobroker",
host.iobroker check instance "system.adapter.vis-material.0" for host "iobroker",
host.iobroker check instance "system.adapter.vis-materialdesign.0" for host "iobroker",
host.iobroker check instance "system.adapter.vis-google-fonts.0" for host "iobroker",
host.iobroker check instance "system.adapter.influxdb.0" for host "iobroker",
host.iobroker check instance "system.adapter.bsblan.0" for host "iobroker",
cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: Permission denied,
,
/bin/sh: 1: vcgencmd: not found,
,
/bin/sh: 1: vcgencmd: not found,
,
/bin/sh: 1: vcgencmd: not found,
,
cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: Permission denied,
,
/bin/sh: 1: vcgencmd: not found,
,
/bin/sh: 1: vcgencmd: not found,
,
/bin/sh: 1: vcgencmd: not found

Die Fehler am Ende stammen wohl vom rasppi-adapter.
Der Rest sieht soweit ja OK aus.

setup_packages.log:

Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [94,3 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91,0 kB]
Get:4 https://deb.nodesource.com/node_10.x stretch InRelease [4.585 B]
Get:5 http://deb.debian.org/debian stretch Release [118 kB]
Get:6 http://deb.debian.org/debian stretch Release.gpg [2.410 B]
Get:7 http://deb.debian.org/debian stretch-updates/main armhf Packages [27,9 kB]
Get:8 http://security.debian.org/debian-security stretch/updates/main armhf Packages [498 kB]
Get:9 https://deb.nodesource.com/node_10.x stretch/main armhf Packages [766 B]
Get:10 http://deb.debian.org/debian stretch/main armhf Packages [6.912 kB]
Fetched 7.749 kB in 17s (432 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package vi

Es scheint also so, als würde er vi schon nicht finden und danach die Package-installation aufgeben.
Das bestätigt sich über die Konsole

apt-get install vi
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vi

...Und während ich das hier schreibe, wird mir das Problem auch klar.
vi ist nicht in der Paketliste...das hatte ich aber aus deinem docker-Beispiel (default) übernommen.
Sobald ich "vi" aus der PACKAGES-ENV-Variable raus werfe, funktioniert alles.

M.W. ist "vi" unter debian "vim"...ist es dann nicht ungünstig "vi" als default in die Docker-ENV-Variable zu übernehmen?
Auch ist es verwirrend, dass die Log "done" auswirft, obwohl gar nicht alle Pakete installiert wurden.
Vielleicht wäre es eine nette Idee, wenn die Log da einen Fehler spucken würde, wenn ein "E: " bei der Paketinstallation auftritt :)

Sorry für die Umstände und danke für den Hinweis, der zur Lösung führte.

Beste Grüße
Markus

@buanet
Copy link
Owner

buanet commented Apr 4, 2020

Hi Markus,

ich habe die Installation der packages angepasst, sodass nicht alle packages hängen bleiben wenn eines fehlt. Außerdem sollten im Container-Log demnächst auch eventuelle Fehler bei der Installation auflaufen. Für das arm Image werde ich außerdem den defaultwert der ENV "Packages" auf "vim" ändern. Vielen Dank dass du das Thema gemeldet hast. Das bringt uns alle voran. Danke!

MfG,
André

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants