$ kstars
org.kde.kstars: Failed to create local astrometry directory
Call to writableLocation without an application-based location.
org.kde.kstars: Welcome to KStars 3.6.0 Stable
org.kde.kstars: Build: 2022-08-27T18:31:54Z
org.kde.kstars: OS: "debian"
org.kde.kstars: API: "arm64-little_endian-lp64"
org.kde.kstars: Arch: "arm64"
org.kde.kstars: Kernel Type: "linux"
org.kde.kstars: Kernel Version: "5.15.61-v8+"
org.kde.kstars: Qt Version: 5.15.2
qt.qpa.xcb: QXcbConnection: XCB error: 148 (Unknown), sequence: 192, resource id: 0, major code: 140 (Unknown), minor code: 20
org.kde.kstars: User DB does not exist. New User DB will be created.
org.kde.kstars: Rebuilding User Database
org.kde.kstars: Processing "unnamedstars.dat" , HTMesh Level 3
org.kde.kstars: Sky Mesh Size: 512
org.kde.kstars: Loaded DSO catalog file: "unnamedstars.dat"
org.kde.kstars: "Star HD20,794 not found."
org.kde.kstars: "Star HD98,230 not found."
org.kde.kstars: Loaded DSO catalogs.
org.kde.kstars: Loading asteroids
terminate called after throwing an instance of 'std::runtime_error'
what(): Could not open file.
Aborted
So I copied the ~/Library/ApplicationSupport/kstars directory from my MacBook to ~/.local/share/kstars on the Raspberry Pi and now it's working.