Essentially, the three following lines of code should sort it:
sudo apt-get install aptitude # install aptitude as an alternative to apt-get
sudo aptitude install libgdal-dev # install the package (you may have to respond to queries here)
sudo aptitude install libproj-dev # install the proj.4 projection library
Spent ages on this problem, so hope this updated answer is useful to others. Let me know if so!
How i solved the problem:
I tried to install those dependencies manually. First tried to install sudo apt-get install libglib2.0-dev but it gives following error:
The following packages have unmet dependencies:
libglib2.0-dev : Depends: libglib2.0-0 (= 2.48.0-1ubuntu4) but 2.48.1-1~ubuntu16.04.1 is to be installed
Depends: libglib2.0-bin (= 2.48.0-1ubuntu4)
Then i tried to install glibs dependency along with glib:
sudo apt-get install libglib2.0-dev libglib2.0-0=2.48.0-1ubuntu4
This time package installation successful.
After that i issued sudo apt-get install libgtk2.0-dev and it works!
Best Answer
We need to add R repository, then install packages from it:
3.4.4
4.0
Download RStudio from official site, for example, version 1.2.5042, and install it with
gdebi
: