I am getting this error when installing R and did not get it before(was able to download it before but not anymore)

I would appreciate any help as I am new to Ubuntu.

 Failed to fetch http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu/vivid/r-doc-html_3.2.2-1vivid0_all.deb
 Could not resolve 'lib.stat.cmu.edu'

1 Answer 1


DNS server might fail to resolve the name lib.stat.cmu.edu. You can try some public DNS like Google's (2001:4860:4860::8888 for IPv6). To do that you can temporarily replace your /etc/resolv.conf with the following:


To do this execute:

sudo su
mv -v /etc/resolv.conf /etc/resolv.conf.bak
echo "nameserver" > /etc/resolv.conf

To restore your original /etc/resolv.conf after the testing do:

sudo mv -vf /etc/resolv.conf.bak /etc/resolv.conf

For longer term, you can append Google's DNS to your set of nameservers by:

sudo su
echo "nameserver" >> /etc/resolv.conf
  • Ok thank you, but how do you replace this exactly..... I am very new with coding in the terminal. Nov 26, 2015 at 5:26
  • @PeteChernek: I've updated the answer
    – psprint
    Nov 26, 2015 at 5:38
  • I tried it but still getting the same error when installing R Nov 26, 2015 at 5:58
  • @PeteChernek: that's weird, for me "host lib.stat.cmu.edu" works fine on and on my default DNS server, so it's not that the site is down. Does this command work for you?
    – psprint
    Nov 26, 2015 at 6:07
  • pete2323@sc-8560w:~$ host lib.stat.cmu.edu lib.stat.cmu.edu is an alias for FRET.stat.cmu.edu. FRET.stat.cmu.edu mail is handled by 10 TEMPER.stat.cmu.edu. Nov 26, 2015 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.