I just tried to install on a different machine and ran into the same problem. this has me wondering what fixed it before. Here's the output:
- libclang-dev doesn't install
sudo apt install libclang-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libclang-dev : Depends: libclang-3.8-dev (>= 3.8~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
- liblcang-3.8-dev doesn't install
sudo apt install libclang-3.8-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libclang-3.8-dev : Depends: libobjc-5-dev but it is not going to be installed
Depends: libclang1-3.8 (= 1:3.8-2ubuntu4) but it is not going to be installed
Depends: libclang-common-3.8-dev (= 1:3.8-2ubuntu4) but it is not going to be installed
rstudio : Depends: libclang-dev but it is not going to be installed
Recommends: r-base (>= 2.11.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
The fix: install all at once:
sudo apt install libclang-dev libclang-3.8-dev libclang-common-3.8-dev libclang1-3.8 libobjc-5-dev libobjc4
I'm 98% sure I didn't previously issue the above command on the first machine where I had this problem. At any rate it worked here.