Skip to main content

Quick fixes: find your symptom

Find the message or symptom you see, try the quick fix, and follow the link if it is not enough. Search this page with Ctrl+F using a word from your error.

If nothing here matches: Finding out what is wrong.

Pi: start-up, clock and card​

SymptomQuick fixMore
Date/time wrong after bootsudo date -s "26 MAR 2026 14:55" (real time)Why
Time right but hours offsudo dpkg-reconfigure tzdatadpkg-reconfigure
Read-only file systemSave what you can, rebootRepair
No space left on device / desktop login loopsdf -h /, then sudo apt cleanCard full
Pi does not boot / QR code screenRe-seat card, official power supplyWill not boot
Lightning bolt / "low voltage" warningUse the official 27 W supplyAvoiding corruption
sudo: unable to resolve hostFix the 127.0.1.1 line in /etc/hostsHostname
Keyboard types wrong symbols (@ ↔ ")sudo dpkg-reconfigure keyboard-configuration, rebootdpkg-reconfigure

apt and installing​

SymptomQuick fixMore
Release file ... is not valid yetSet the date, then sudo apt updateChecklist
Could not get lock /var/lib/dpkg/lock-frontendWait for the other install; do not delete locksapt errors
dpkg was interruptedsudo dpkg --configure -aRepairing installs
Unable to locate packagesudo apt update, check spelling
unmet dependenciessudo apt --fix-broken install
Skipped or wrong answer in a blue setup screensudo dpkg-reconfigure PACKAGEdpkg-reconfigure

Apache and web pages​

SymptomQuick fixMore
This site can't be reached (port 80)sudo apache2ctl configtest, then sudo systemctl restart apache2Apache
404 at /phpmyadminsudo dpkg-reconfigure phpmyadmin, Spacebar on apache2phpMyAdmin 404
404 on your pageFile not in /var/www/html, or different capitalsError codes
403 Forbiddensudo chmod 644 file (folders 755)Why 403
500 error / blank pagesudo tail /var/log/apache2/error.logApache
PHP code shown as text / file downloadssudo apt install libapache2-mod-php, restart ApachePHP
mysqli extension is missing / Class "mysqli" not foundsudo apt install php-mysql, restart Apache
AH00558: Could not reliably determine the server's fully qualified domain nameHarmless warningApache

MariaDB and phpMyAdmin logins​

SymptomQuick fixMore
Locked out / forgot root passwordsudo mariadb (no password)Root
ERROR 1698 Access denied for user 'root'@'localhost'sudo mariadbRoot
ERROR 1045 Access denied for user 'Nypuser' / phpMyAdmin #1045sudo mariadb, SELECT User, Host FROM mysql.user;Host part
Nypuser missingRecreate it: create a user
Logged in, but no databasesGRANT ALL PRIVILEGES ON MySensor.* TO ...Permissions
ERROR 1396 Operation CREATE USER failedUser exists: ALTER USER or DROP USER firstMistakes
ERROR 2002 Can't connect ... through socket / phpMyAdmin #2002sudo systemctl start mariadbWill not start
ERROR 1049 Unknown database / 1146 Table doesn't existCheck capitals: MySensor, DataSQL errors
Cannot connect from a laptopbind-address + % userRemote

Python, serial and Flask​

SymptomQuick fixMore
externally-managed-environmentsource /home/pi/env/bin/activate firstvenv
No module named 'serial' / 'pymysql' / 'flask'Thonny: Tools → Options → Interpreter → /home/pi/env/bin/python3venv and Thonny
IndentationError / TabErrorRe-indent with 4 spacesPython errors
could not open port /dev/ttyACM0: No such fileArduino plugged into the Pi? ls /dev/tty*Serial
Permission denied: '/dev/ttyACM0'sudo usermod -aG dialout pi, log out and inGroups
Device or resource busyClose the Serial Monitor / old scriptOne program at a time
could not convert string to floatDamaged/swapped line: read by labelSafer reading
Script says saved, table emptydb.commit() missingPython to MariaDB
Flask: Address already in useStop the old run: sudo fuser -k 5000/tcpFlask
Flask: TemplateNotFoundFile in templates/ (lower case), name matchesFlask
Flask page not reachable from laptopapp.run(host='0.0.0.0'), use the Pi's IPFlask

Arduino​

SymptomQuick fixMore
Port not listedOther USB cable (data, not charge-only); CH340 driver for clonesIDE
avrdude: ... not in sync / programmer is not respondingCorrect board + port; nothing on pins 0/1Upload errors
Port busy / Access is deniedClose Serial Monitor / Pi script
xyz.h: No such file or directoryInstall the libraryLibraries
was not declared in this scopeTypo or capitals (Serial, digitalWrite)Compile errors
Garbage in the Serial MonitorBaud rate 9600 on both sidesSerial
Button presses by itselfFloating input: INPUT_PULLUPButtons
LED will not dimUse a ~ pin (3, 5, 6, 9, 10, 11)PWM
LCD backlight on, no textSDA→A4 (white), SCL→A5 (yellow), 5VLCD
LCD shows leftover digitsPrint spaces after the valueLCD
Temperature −273.15 / infSensor SIG not on A0Temperature
Distance always 0Wrong pin / no echoUltrasonic

SSH and network​

SymptomQuick fixMore
REMOTE HOST IDENTIFICATION HAS CHANGEDOn the laptop: ssh-keygen -R 172.16.x.xSSH errors
Connection timed outhostname -I on the Pi; same Wi-Fi?SSH
Connection refused (SSH)sudo systemctl enable --now ssh
IP changedNormal; check every labNetworking
No internetping 8.8.8.8 vs ping google.comTesting