When I tried to install packages on my work laptop, I got an error. I\'ve been told that I have full privileges with the laptop, so there should be no blocks.
I thi
i was struggling with the same problem, for a long time and mikes solution didnt help me either. I tried everything upto reinstalling R. Still didnt work. However the solution is quite simple in my case. In the Terminal dont run R as R but use:
sudo -i R
or change ownership of the r package folders, becaues if its owned by root you are not allowed to read or write in it.
I had the same problem and solved it by install g++ compiler
$ sudo apt install g++