I'm very new to linux, my only experience being using a computer that belonged to somebody else before, meaning that everything was already configured/downloaded and I had no problem doing my job on it, which envolves using some GIS tools and RStudio.
Turns out three days ago I received a new computer form my boss and I decided to maintain the tradition and install linux too. All my co-workers were using Mint 18.3, so I downloaded it and installed it. It turns out it wasn't as straight-forward as I thought.
After reading a bunch of forums and questions posted here, I managed to update my sources.list and insert a CRAN mirror for the download of the latest release of R (3.4.4). RStudio promptly recognized it. However, installing new packages is nearly impossible, as even "native" functionalities, such as import dataset are disabled because the packages couldn't be downloaded.
I tried opening R through the terminal and installing packages using the install.packages function, but the problem persisted. How can I fix my RStudio in order to install packages correctly?
Below there is a copy of the log (note that I specified the mirror manually):
> install.packages("Rcpp",repo="https://cloud.r-project.org/", type="source")
Installing package into ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/Rcpp_0.12.16.tar.gz'
Content type 'application/x-gzip' length 3763400 bytes (3.6 MB)
==================================================
downloaded 3.6 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c Date.cpp -o Date.o
/bin/bash: g++: command not found
/usr/lib/R/etc/Makeconf:168: recipe for target 'Date.o' failed
make: *** [Date.o] Error 127
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/home/iis/R/x86_64-pc-linux-gnu-library/3.4/Rcpp’
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
Again, since I'm very new to linux, I don't know really which information I should provide to better help you, but please keep in mind that everything is probably on a default/factory setting. If you need additional information I can provide you (given the proper instructions)