Raspberry Distribution Update am Beispiel des OctoPI-Image

 

Nachdem mein OctoPI-Image etwas in die Jahre gekommen ist und sich OctoPrint nicht mehr updaten ließ, habe ich ein OS-Upgrade von Version 8 (Jessie) auf Version 10 (Buster) versucht. Bei dem Versuch musste ich OctoPrint auch neu installieren, schlussendlich hat das Update aber geklappt und ich denke im Vergleich zum Aufspielen eines neuen Images habe ich in Summe nicht mehr Zeit für das Update investiert.

OS-Version

Für die Anzeige welche Raspbean Version im Einsatz ist, kann folgender Befehl  werden: "cat /etc/os-release", hier meine Ausgangssituation: Version 8 (Jessie)

pi@octopi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Kernel-Version

Der eingesetzte Kernel kann mit "uname -a" angezeigt werden:

pi@octopi:~ $ uname -a
Linux octopi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

Distribution Update

Um ein Upgrade auf eine neuere OS-Version zu machen, muss das OS in den folgenden Dateien angepasst werden:  "/etc/apt/sources.list" und "/etc/apt/sources.list.d/raspi.list"

Als Beispiel kann "jessy" oder "stretch" auf "buster" geändert werden um das OS auf Buster upzudaten.

"/etc/apt/sources.list"

deb http://mirrordirector.raspbian.org/raspbian/ buster main contrib non-free rpi

"/etc/apt/sources.list.d/raspi.list"

deb http://archive.raspberrypi.org/debian/ buster main ui

Das Upgrade starten:

sudo apt update
sudo apt -y dist-upgrade

siehe auch: https://www.raspberrypi.org/documentation/computers/os.html

Errors were encountered while processing: syslog-ng-core

pi@octopi:~ $ sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
...
dpkg: error processing package syslog-ng-mod-redis (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 syslog-ng-core
 syslog-ng-mod-examples
 syslog-ng-mod-xml-parser
 syslog-ng-mod-stomp
 syslog-ng-mod-riemann
 syslog-ng-mod-stardate
 syslog-ng-mod-pacctformat
 syslog-ng-mod-geoip2
 syslog-ng-mod-getent
 syslog-ng-mod-amqp
 syslog-ng-mod-python
 syslog-ng-mod-smtp
 syslog-ng-mod-tag-parser
 syslog-ng-mod-extra
 syslog-ng-mod-snmptrapd-parser
 syslog-ng-mod-graphite
 syslog-ng-mod-add-contextual-data
 syslog-ng-mod-mongodb
 syslog-ng-mod-geoip
 syslog-ng-mod-map-value-pairs
 syslog-ng-mod-sql
 syslog-ng-mod-redis
E: Sub-process /usr/bin/dpkg returned an error code (1)

Mit den folgenden Befehlen konnte ich das Problem lösen:

sudo apt-get clean
sudo apt update && sudo dpkg --configure -a && sudo apt -f install                                 
sudo apt full-upgrade

siehe auch:  apt-get Unable to correct problems, you have held broken packages

Octoprint neu installieren

Eine Anleitung für eine Neuinstallation habe ich auf der OctoPrint-Community-Seite gefunden, hier nochmal die relevanten Befehle:

cd ~
sudo apt update
sudo apt install python3-pip python3-dev python3-setuptools python3-venv git libyaml-dev build-essential
mkdir OctoPrint && cd OctoPrint
python3 -m venv venv
source venv/bin/activate
pip install pip --upgrade
pip install octoprint
sudo usermod -a -G tty pi
sudo usermod -a -G dialout pi
wget https://github.com/OctoPrint/OctoPrint/raw/master/scripts/octoprint.service && sudo mv octoprint.service /etc/systemd/system/octoprint.service

siehe: https://community.octoprint.org/t/setting-up-octoprint-on-a-raspberry-pi-running-raspbian-or-raspberry-pi-os/2337

Nach einem Reboot des Raspberry wurde OctoPrint dann auch wieder automatisch gestartet und funktioniert einwandfrei.

 

positive Bewertung({{pro_count}})
Beitrag bewerten:
{{percentage}} % positiv
negative Bewertung({{con_count}})

DANKE für deine Bewertung!

Veröffentlichung: 16.08.2021 von Bernhard |🔔 | Kommentare:0

Raspberry Pi | Raspberry PI als WLAN Access-Point

Fragen / Kommentare


Durch die weitere Nutzung der Seite stimmst du der Verwendung von Cookies zu Mehr Details