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
| Symptom | Quick fix | More |
|---|---|---|
| Date/time wrong after boot | sudo date -s "26 MAR 2026 14:55" (real time) | Why |
| Time right but hours off | sudo dpkg-reconfigure tzdata | dpkg-reconfigure |
Read-only file system | Save what you can, reboot | Repair |
No space left on device / desktop login loops | df -h /, then sudo apt clean | Card full |
| Pi does not boot / QR code screen | Re-seat card, official power supply | Will not boot |
| Lightning bolt / "low voltage" warning | Use the official 27 W supply | Avoiding corruption |
sudo: unable to resolve host | Fix the 127.0.1.1 line in /etc/hosts | Hostname |
Keyboard types wrong symbols (@ ↔ ") | sudo dpkg-reconfigure keyboard-configuration, reboot | dpkg-reconfigure |
apt and installing
| Symptom | Quick fix | More |
|---|---|---|
Release file ... is not valid yet | Set the date, then sudo apt update | Checklist |
Could not get lock /var/lib/dpkg/lock-frontend | Wait for the other install; do not delete locks | apt errors |
dpkg was interrupted | sudo dpkg --configure -a | Repairing installs |
Unable to locate package | sudo apt update, check spelling | |
unmet dependencies | sudo apt --fix-broken install | |
| Skipped or wrong answer in a blue setup screen | sudo dpkg-reconfigure PACKAGE | dpkg-reconfigure |
Apache and web pages
| Symptom | Quick fix | More |
|---|---|---|
This site can't be reached (port 80) | sudo apache2ctl configtest, then sudo systemctl restart apache2 | Apache |
404 at /phpmyadmin | sudo dpkg-reconfigure phpmyadmin, Spacebar on apache2 | phpMyAdmin 404 |
| 404 on your page | File not in /var/www/html, or different capitals | Error codes |
| 403 Forbidden | sudo chmod 644 file (folders 755) | Why 403 |
| 500 error / blank page | sudo tail /var/log/apache2/error.log | Apache |
| PHP code shown as text / file downloads | sudo apt install libapache2-mod-php, restart Apache | PHP |
mysqli extension is missing / Class "mysqli" not found | sudo apt install php-mysql, restart Apache | |
AH00558: Could not reliably determine the server's fully qualified domain name | Harmless warning | Apache |
MariaDB and phpMyAdmin logins
| Symptom | Quick fix | More |
|---|---|---|
| Locked out / forgot root password | sudo mariadb (no password) | Root |
ERROR 1698 Access denied for user 'root'@'localhost' | sudo mariadb | Root |
ERROR 1045 Access denied for user 'Nypuser' / phpMyAdmin #1045 | sudo mariadb, SELECT User, Host FROM mysql.user; | Host part |
| Nypuser missing | Recreate it: create a user | |
| Logged in, but no databases | GRANT ALL PRIVILEGES ON MySensor.* TO ... | Permissions |
ERROR 1396 Operation CREATE USER failed | User exists: ALTER USER or DROP USER first | Mistakes |
ERROR 2002 Can't connect ... through socket / phpMyAdmin #2002 | sudo systemctl start mariadb | Will not start |
ERROR 1049 Unknown database / 1146 Table doesn't exist | Check capitals: MySensor, Data | SQL errors |
| Cannot connect from a laptop | bind-address + % user | Remote |
Python, serial and Flask
| Symptom | Quick fix | More |
|---|---|---|
externally-managed-environment | source /home/pi/env/bin/activate first | venv |
No module named 'serial' / 'pymysql' / 'flask' | Thonny: Tools → Options → Interpreter → /home/pi/env/bin/python3 | venv and Thonny |
IndentationError / TabError | Re-indent with 4 spaces | Python errors |
could not open port /dev/ttyACM0: No such file | Arduino plugged into the Pi? ls /dev/tty* | Serial |
Permission denied: '/dev/ttyACM0' | sudo usermod -aG dialout pi, log out and in | Groups |
Device or resource busy | Close the Serial Monitor / old script | One program at a time |
could not convert string to float | Damaged/swapped line: read by label | Safer reading |
| Script says saved, table empty | db.commit() missing | Python to MariaDB |
Flask: Address already in use | Stop the old run: sudo fuser -k 5000/tcp | Flask |
Flask: TemplateNotFound | File in templates/ (lower case), name matches | Flask |
| Flask page not reachable from laptop | app.run(host='0.0.0.0'), use the Pi's IP | Flask |
Arduino
| Symptom | Quick fix | More |
|---|---|---|
| Port not listed | Other USB cable (data, not charge-only); CH340 driver for clones | IDE |
avrdude: ... not in sync / programmer is not responding | Correct board + port; nothing on pins 0/1 | Upload errors |
Port busy / Access is denied | Close Serial Monitor / Pi script | |
xyz.h: No such file or directory | Install the library | Libraries |
was not declared in this scope | Typo or capitals (Serial, digitalWrite) | Compile errors |
| Garbage in the Serial Monitor | Baud rate 9600 on both sides | Serial |
| Button presses by itself | Floating input: INPUT_PULLUP | Buttons |
| LED will not dim | Use a ~ pin (3, 5, 6, 9, 10, 11) | PWM |
| LCD backlight on, no text | SDA→A4 (white), SCL→A5 (yellow), 5V | LCD |
| LCD shows leftover digits | Print spaces after the value | LCD |
Temperature −273.15 / inf | Sensor SIG not on A0 | Temperature |
| Distance always 0 | Wrong pin / no echo | Ultrasonic |
SSH and network
| Symptom | Quick fix | More |
|---|---|---|
REMOTE HOST IDENTIFICATION HAS CHANGED | On the laptop: ssh-keygen -R 172.16.x.x | SSH errors |
Connection timed out | hostname -I on the Pi; same Wi-Fi? | SSH |
Connection refused (SSH) | sudo systemctl enable --now ssh | |
| IP changed | Normal; check every lab | Networking |
| No internet | ping 8.8.8.8 vs ping google.com | Testing |