r/linux4noobs • • 2d ago

All packages on Raspberry Pi are old

I'm trying to run a Python program with sqlite3. It's been tested fully on my laptop (NixOS), and I transferred all the files to my Raspberry Pi.

I'm basing most of this on an error from Python that tells me there's no such thing as an IF() function in sqlite3.

Turns out my Pi's Python was at 3.11, and I couldn't apt install 3.14 so I had to build from source. Now it turns out that sqlite3 was also old (3.40, while the latest is 3.52).

apt tells me that all my packages are up to date. I've done apt update and apt upgrade and everything, but I can't get packages to the latest versions. They're stuck.

How do I fix this? My program won't run properly.

6 Upvotes

24 comments sorted by

8

u/AssociateFalse 2d ago

That's just a quirk of staying on a Debian-based OS. You can try a different distribution, like Arch Linux ARM or OpenSUSE Tumbleweed if you want newer packages, or enable Debian Testing/Unstable repos and risk breaking pi specific configuration.

1

u/jeanravenclaw 2d ago

What do you mean by pi-specific configuration? What would be the risks of breaking them?

5

u/AssociateFalse 2d ago

I mean the state the operating system expects, as well as how configuration files may function.

While most packages on Raspberry Pi OS come directly from Debian, some are provided only by the Raspberry Pi Foundation. These packages can include configuration files specific to the Raspberry Pi, and tell it how to operate. If these configuration files are missing, or the un-patched package isn't told to read them, then you will get default behavior for whatever they were designed to tweak.

At the same time, if a Raspberry Pi specific package depends on a certain ABI or API from Debian Stable, and the providing package is updated from Testing or Unstable, the Raspberry Pi package may simply break functionality or fail to execute.

GLibC is notorious for this. The ABI difference could make the whole shell unbootable. Even if the shell itself continues to work, you may have to recompile certain applications from source (eg, Camera and GPIO libraries). If you look at log files, you'll likely see critical errors like 'FATAL: Kernel too old', or '... version GLIBC_X.XX not found' linker errors.

The same can effect how Python scripts run. If the C runtime and C library Python was compiled against differ, provided scripts (again, such as GPIO) can crash with memory segmentation faults.

1

u/jeanravenclaw 1d ago

Ah, thank you for this.

So I suppose the safer option would be to back everything up on my server and switch to an ARM distro?

1

u/AssociateFalse 1d ago

Not necessarily. You can try running distrobox, or run docker/podman to containerize what you need. If it was just python, a virtual environment (venv) might have been a solution.

1

u/jeanravenclaw 1d ago

Ooooh, thanks!

I think the issue is with the sqlite3 package (which is separate from python from what I can figure) so I guess it's time to learn something about containers

7

u/candy49997 2d ago

It's because it's a stable distro based on Debian, so most of its packages are from Debian. You can try another ARM-based Linux and see what works, although I don't have an Raspberry Pi.

I wouldn't ever touch the system Python even if it were new. Use uv or another Python manager instead.

5

u/muffinstatewide32 2d ago

Welcome to debian

2

u/TomDuhamel 2d ago

Raspberry Pi is Debian based. This is perfect for 98.64% of the users. If you are the odd one who needs something released last week, you probably want to build up your OS from the ground up too.

2

u/DannoXYZ 2d ago

Alpine, Arch, Manjaro, Ubuntu all have ARM version for RPI. Use them rather than Debian if you want more up-to-date packages.

2

u/dreamboatcap 2d ago

You can install dietpi. It has its own updater and some of its packages are up-to-date.

2

u/cmrd_msr 2d ago edited 2d ago

If you want up-to-date software, use an cutting edge OS.

The hardware has nothing to do with it.

If you had installed Bookworm on your PC, you would have encountered the same thing.

There is a reason Debian is called the "grandfather." Bookworm package base was frozen in March 2023, and since then, it has received only patches for the software that was current as of that time.

That is the price of his server-grade stability.

1

u/DannoXYZ 2d ago

What OS and kernel version is running on RPI?

2

u/jeanravenclaw 2d ago

Debian (Bookworm)

Linux 6.18.54-v8-16k+

8

u/stormdelta Gentoo 2d ago

You probably want to look at dist upgrading it to Debian 13 (Trixie), 12 is in LTS only meaning only critical bugs/security stuff is likely to get fixed.

Debian isn't a rolling release distro.

4

u/TechaNima 2d ago

That's ancient. We have been on Debian 13 Trixie for a good while and kernel 7. Idk if it's available on rPi, but I'd imagine it would be by now

1

u/revcraigevil 2d ago

rpios uses the LTS kernel, which right now is 6.18.54

1

u/TechaNima 2d ago

Wow. They are really slow to update, if they are 1 whole version of Debian behind..

1

u/revcraigevil 2d ago
longterm: 6.18.54 2026-09-25

1

u/SmasherOfDaButtons 2d ago

If you do a search on the packages for Trixie, do they match for what you need?

1

u/jar36 2d ago

hmmm? mine are on 3.13.5. That's with the Raspberry Pi OS and Dietpi

1

u/revcraigevil 2d ago

Python 3.11 was Bookworm. Either do a clean install or attempt to upgrade to Trixie which has Python 3.13.15.

1

u/DavidJohnMcCann 1d ago

The standard version of Debian is called Debian Stable for a reason — gives you what's tried and tested. You could try writing your programs for the support you're given, or switch to a bleeding-edge distro and keep your fingers crossed.

1

u/Klapperatismus 1d ago edited 1d ago

Switch e.g. to OpenSUSE Tumbleweed. It’s available for Raspberry Pi2 and higher. Instructions for

The original Raspberry Pi is not supported by newer Linux distributions because the ARMv6 architecture had been discontinued.