To resolve missing R package dependencies such as 'latticeExtra', 'png', and 'jpeg' when installing the 'openair' package in RStudio inside a Fedora 41 distrobox container, you need to install the required system-level development libraries. Open a terminal inside your container and run:
sudo dnf install libpng-devel libjpeg-turbo-devel gcc make
After installing these libraries, install the R packages in RStudio or the R console:
install.packages("png")
install.packages("jpeg")
install.packages("latticeExtra")
install.packages("openair")
If you encounter a warning about your system being misconfigured (e.g., /etc/localtime is not a symlink), you can fix it in two ways:
1. System-wide fix (requires sudo):
sudo ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
2. User-level fix (no sudo required):
Set the TZ environment variable before starting RStudio or in your shell:
export TZ=America/Los_Angeles
Or inside R:
Sys.setenv(TZ = "America/Los_Angeles")
To make it permanent, add export TZ=America/Los_Angeles to your ~/.bashrc or ~/.profile inside the container.
These steps will resolve both the missing dependency errors and the timezone configuration warning.