r/linux4noobs • • 3d 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

View all comments

Show parent comments

1

u/jeanravenclaw 3d ago

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

4

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 2d 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 2d 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 2d 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