Unable to install some libraries in Rstudio

For what I can see on the screenshot you are missing the udunits2 system library, you need to install it first. On Ubuntu the command would be:

sudo apt-get install libudunits2-dev

Also, please do not post screenshots, they are considered a bad practice here, post formated code instead. Here is how to do it: