Package Management¶
Calculinux uses opkg (Open Package Management) for installing, updating, and removing software packages.
Understanding Package Feeds¶
Calculinux packages are hosted on package feeds at https://opkg.calculinux.org/. Your system is automatically configured to use the appropriate feed based on your installed version. You typically don't need to modify the feed configuration.
Feed Types¶
Continuous Feed: Rolling release packages with the latest updates
- URL format: https://opkg.calculinux.org/ipk/{codename}/continuous/
- Updated automatically as changes are made
- Best for staying current with development
- May include experimental features
- Used by main and develop branch builds
Release Feed: Stable versioned packages
- URL format: https://opkg.calculinux.org/ipk/{codename}/release/
- Locked to specific release versions
- Thoroughly tested before release
- Recommended for production use
- Used by tagged releases (e.g., v1.0.0)
Which Feed Am I Using?¶
Check your current feed configuration:
Example output for a continuous build:
src/gz all https://opkg.calculinux.org/ipk/walnascar/continuous/all
src/gz cortexa7t2hf-neon-vfpv4 https://opkg.calculinux.org/ipk/walnascar/continuous/cortexa7t2hf-neon-vfpv4
src/gz luckfox_lyra https://opkg.calculinux.org/ipk/walnascar/continuous/luckfox_lyra
The feed configuration is set during the image build process and matches the image type:
- Images from main branch → walnascar/continuous feed
- Images from develop branch → develop/continuous feed
- Images from tagged releases → walnascar/release feed
Basic Commands¶
Updating Package Lists¶
Before installing or updating packages, refresh the package list:
Installing Packages¶
Install a package:
Example:
Removing Packages¶
Remove a package:
Remove a package and its configuration files:
Searching for Packages¶
Search for available packages:
Example:
Search for installed packages:
Viewing Package Information¶
Get information about a package:
List files in an installed package:
Updating Packages¶
Update all installed packages:
Update a specific package:
Advanced Usage¶
Installing from a File¶
Install a .ipk package file directly:
Listing Available Packages¶
List all available packages:
List all installed packages:
List upgradeable packages:
Finding Which Package Provides a File¶
Example:
Package Dependencies¶
View package dependencies:
View reverse dependencies (what depends on this package):
Feed Configuration¶
Automatic Configuration
Package feeds are automatically configured during image creation. You typically don't need to change feed configuration unless you're testing different package versions or have specific advanced requirements.
Switching Feeds (Advanced)¶
Advanced Users Only
Switching feeds may cause package version conflicts and is only recommended for testing or specific use cases. Most users should use the pre-configured feed that came with their image.
To switch from continuous to release feed, edit /etc/opkg/base-feeds.conf:
# Backup current configuration
cp /etc/opkg/base-feeds.conf /etc/opkg/base-feeds.conf.backup
# Edit feed URLs
vi /etc/opkg/base-feeds.conf
Change continuous to release in all URLs (or vice versa):
src/gz all https://opkg.calculinux.org/ipk/walnascar/release/all
src/gz cortexa7t2hf-neon-vfpv4 https://opkg.calculinux.org/ipk/walnascar/release/cortexa7t2hf-neon-vfpv4
src/gz luckfox_lyra https://opkg.calculinux.org/ipk/walnascar/release/luckfox_lyra
Then update:
Persistence
Changes to /etc/opkg/base-feeds.conf persist across reboots because Calculinux uses overlayfs - your changes are stored in the upper (writable) layer.
Adding Custom Feeds¶
To add a custom package feed:
Development vs. Stable Codenames¶
Different Calculinux versions use different distribution codenames in their feed URLs:
- walnascar: Stable releases and main branch continuous builds
- Example:
https://opkg.calculinux.org/ipk/walnascar/continuous/ -
Example:
https://opkg.calculinux.org/ipk/walnascar/release/ -
develop: Development branch builds (bleeding-edge features)
- Example:
https://opkg.calculinux.org/ipk/develop/continuous/
Codename Compatibility
Switching between different codenames (e.g., walnascar ↔ develop) may cause significant package compatibility issues. This is not recommended except for advanced testing scenarios. If you want bleeding-edge packages, it's better to flash a new develop branch image rather than switching feeds.
Common Tasks¶
Installing Development Tools¶
Installing Python Packages¶
Installing Networking Tools¶
Cleaning Package Cache¶
Free up disk space by removing downloaded package files:
Troubleshooting¶
Package Installation Fails¶
If a package fails to install:
-
Update package lists:
-
Check available space:
-
Check error message for missing dependencies:
Repository Connection Issues¶
If you can't connect to the package feeds:
-
Check network connectivity:
-
Verify feed URLs:
-
Try updating manually:
Version Conflicts¶
If you encounter version conflicts:
# Force reinstallation
opkg install --force-reinstall <package-name>
# Force downgrade
opkg install --force-downgrade <package-name>
Broken Packages¶
To fix broken package installations:
# Remove partially installed package
opkg remove --force-remove <package-name>
# Reinstall
opkg update
opkg install <package-name>
Package Feed Structure¶
Calculinux package feeds are organized by architecture:
- all: Architecture-independent packages
- cortexa7t2hf-neon-vfpv4: ARM Cortex-A7 optimized packages
- luckfox_lyra: Board-specific packages for Luckfox Lyra
Your system automatically uses packages from all relevant feeds.
Best Practices¶
- Always update before installing: Run
opkg updatebeforeopkg install - Regular updates: Keep your system updated with
opkg update && opkg upgrade - Check dependencies: Use
opkg infoto check dependencies before installing - Backup configurations: Keep backups of important config files before major updates
- Use stable feeds for production: Stick to release feeds for production devices
- Test on continuous feeds: Use continuous feeds for testing new features
Comparison with Other Package Managers¶
If you're coming from other Linux distributions:
| Opkg | APT (Debian/Ubuntu) | DNF (Fedora) |
|---|---|---|
opkg update |
apt update |
dnf check-update |
opkg install |
apt install |
dnf install |
opkg remove |
apt remove |
dnf remove |
opkg list |
apt list |
dnf list |
opkg upgrade |
apt upgrade |
dnf upgrade |
See Also¶
- System Configuration - Configure your system
- Updates - System update procedures
- Building Calculinux - Build configuration and feeds
- Adding Packages - Create your own packages