0

I'm trying to install R and lidR on Debian 11:

Installed r-base-dev v 4.0.4-1 using Synaptics

Starting R in terminal, and:

install.packages("lidR", dependencies=TRUE)

The install process goes on for ~10 minutes, and ends with:

There were 18 warnings (use warnings() to see them)

> warnings()
Warning messages:
1: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘systemfonts’ had non-zero exit status
2: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘terra’ had non-zero exit status
3: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘s2’ had non-zero exit status
4: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘units’ had non-zero exit status
5: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘rgeos’ had non-zero exit status
6: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘rgdal’ had non-zero exit status
7: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘svglite’ had non-zero exit status
8: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘raster’ had non-zero exit status
9: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘sf’ had non-zero exit status
10: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘leafpop’ had non-zero exit status
11: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘satellite’ had non-zero exit status
12: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘lidR’ had non-zero exit status
13: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘leaflet’ had non-zero exit status
14: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘leafem’ had non-zero exit status
15: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘leaflet.extras’ had non-zero exit status
16: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘leafpm’ had non-zero exit status
17: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘mapview’ had non-zero exit status
18: In install.packages("lidR", dependencies = TRUE) :
  installation of package ‘mapedit’ had non-zero exit status

Shouldnt this way of installing lidR work?

> library(lidR)
Error in library(lidR) : there is no package called ‘lidR’
2
  • 1
    The error messages show all dependencies failed installation. Maybe the smallest package among these is units. Try to install it (for avoiding waiting 10 mins) and then load it. I'm not familiar with Debian, perhaps admin permissions should be conceded when installing libraries
    – aldo_tapia
    Dec 16, 2021 at 15:24
  • 1
    Not much point showing us the warnings - where's the error messages? What's the first thing that went wrong? Maybe you've not got the packages needed to build packages from source code? Can you edit and show the first error messages?
    – Spacedman
    Dec 16, 2021 at 15:48

1 Answer 1

1

These are the steps I had to take to get it working:

In Synaptics Package manager install: r-base-dev

In terminal: sudo R, then install.packages("units"), didnt work first time so:

synaptics: libudunits2-dev

in terminal sudo R, then install.packages("units"), now it worked

in terminal sudo R, then install.packages("terra")

synaptics: libgdal-dev

in terminal sudo R, then install.packages("terra")

in terminal sudo R, then install.packages("s2")

in terminal sudo R, then install.packages("raster")

in terminal, sudo R, then install.packages("sf")

in terminal, sudo R, then install.packages("lidR")

( As a reminder to myself, I then downloaded the latest R-studio and installed with sudo apt install /home/bera/Downloads/rstudio-2021.09.1-372-amd64.deb )

The system dependencies are listed in the readme

1
  • 1
    The system dependencies are listed in the REAME.
    – JRR
    Dec 17, 2021 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.