The traceback that you provide is not showing the actual error that is causing the installation to fail. The 'status 1' is just a general failure code. The real error should be in the console output just before the traceback begins.
Can you re-run the renv::install("RcppEigen") and capture / paste the full output here? - it will likely reveal a compilation error of some kind.
In the meantime, RcppEigen is a C++-based package and requires compilation from source when using renv (which is what is happening here). On RHEL7 systems like yours (based on the path /risapps/rhel7/), this often fails due to missing system-level development tools. Common culprits are the absence of a C++ compiler (g++) or related libraries.
Try the following:
Exit R and ensure you have the necessary system packages installed. If you have sudo access (or can ask your sysadmin), run:
sudo yum install gcc gcc-c++ make eigen3-devel
The eigen3-devel is particularly important for RcppEigen, as it provides the Eigen headers that the package relies on during compilation.
If you're on an HPC cluster (which this looks like), you may need to load modules first, e.g.:
module load gcc
Check with module avail to see what's available.
Back in R, try installing RcppEigen outside of renv first to isolate the issue:
install.packages("RcppEigen", type = "source")
If this succeeds, then the problem is specific to renv's staging process. You can then try renv::install("RcppEigen") again.
If it still fails, check for a log file in ~/.cache/R/renv/ or the staging directory mentioned in your traceback (~/scp/SCP_env/renv/staging/1). There may be more details there.
SCP itself is a great package for single-cell work, but its dependencies like RcppEigen can be tricky on older R versions (4.2.1 is from 2022). If possible, consider upgrading R to a newer version, as binaries may be available and avoid source compilation.
Let me know how you get on (with the full error, if it persists).
Please use
options(renv.verbose = TRUE)or useinstall.packages()so one sees the compilation log. Above message is not helpful for debugging.The system has been.