[R-sig-Debian] Installing R in Ubuntu

Vincent Goulet vincent.goulet at act.ulaval.ca
Sun Apr 13 16:29:22 CEST 2008


Le sam. 12 avr. à 20:58, Villoria, Nelson B a écrit :
> Hello, I am new to Ubuntu (Linux in general) and I am trying to  
> install R: so far, I am stuck. I have followed the instructions at  
> the CRAN website with little luck. I read an exchange about the same  
> issue posted before, but did not give me enough information to solve  
> things by myself, hence, this email. Based on the former exchange I  
> read, I am trying to include enough information to see if somebody  
> can help me. In advance, many thanks!
> ******************************************************************
> This what I added to my list:
>
> deb http://rh-mirror.linux.iastate.edu/CRAN/bin/linux/ubuntu dapper/
>
> ******************************************************************
> nvilloria at nvilloria-desktop:~$ sudo apt-get update
> Get:1 http://rh-mirror.linux.iastate.edu dapper/ Release.gpg [189B]
> Hit http://rh-mirror.linux.iastate.edu dapper/ Release
> Ign http://rh-mirror.linux.iastate.edu dapper/ Packages
> Get:2 http://us.archive.ubuntu.com dapper Release.gpg [189B]
> Get:3 http://us.archive.ubuntu.com dapper-updates Release.gpg [191B]
> Get:4 http://security.ubuntu.com dapper-security Release.gpg [191B]
> Hit http://rh-mirror.linux.iastate.edu dapper/ Packages
> Hit http://us.archive.ubuntu.com dapper Release
> Hit http://security.ubuntu.com dapper-security Release
> Hit http://us.archive.ubuntu.com dapper-updates Release
> Hit http://security.ubuntu.com dapper-security/main Packages
> Hit http://us.archive.ubuntu.com dapper/main Packages
> Hit http://us.archive.ubuntu.com dapper/restricted Packages
> Hit http://security.ubuntu.com dapper-security/restricted Packages
> Hit http://security.ubuntu.com dapper-security/main Sources
> Hit http://us.archive.ubuntu.com dapper/main Sources
> Hit http://us.archive.ubuntu.com dapper/restricted Sources
> Hit http://us.archive.ubuntu.com dapper-updates/main Packages
> Hit http://us.archive.ubuntu.com dapper-updates/restricted Packages
> Hit http://us.archive.ubuntu.com dapper-updates/main Sources
> Hit http://us.archive.ubuntu.com dapper-updates/restricted Sources
> Hit http://security.ubuntu.com dapper-security/restricted Sources
> Fetched 4B in 1s (2B/s)
> Reading package lists... Done
> *********************************************************************
> nvilloria at nvilloria-desktop:~$ sudo apt-get dist-upgrade
> Reading package lists... Done
> Building dependency tree... Done
> Calculating upgrade... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> *********************************************************************
> nvilloria at nvilloria-desktop:~$ sudo apt-get install r-base-core
> Reading package lists... Done
> Building dependency tree... Done
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
>
> Since you only requested a single operation it is extremely likely  
> that
> the package is simply not installable and a bug report against
> that package should be filed.
> The following information may help to resolve the situation:
>
> The following packages have unmet dependencies:
>  r-base-core: Depends: libgfortran0 (>= 4.0.2) but it is not  
> installable
> E: Broken packages
> ***************************************************************************
> nvilloria at nvilloria-desktop:~$ apt-cache policy r-base
> r-base:
>  Installed: (none)
>  Candidate: 2.6.2-1dapper0
>  Version table:
>     2.6.2-1dapper0 0
>        500 http://rh-mirror.linux.iastate.edu dapper/ Packages
>
> nvilloria at nvilloria-desktop:~$ apt-get install r-base
> E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission  
> denied)
> E: Unable to lock the administration directory (/var/lib/dpkg/), are  
> you root?
> nvilloria at nvilloria-desktop:~$

This last error message is easy: you forgot to sudo.

As 'apt-cache show libgfortran0' will tell you, the version of  
libgfortran0 in Dapper is 4.0.3-1unbuntu5, so the dependency is  
satisfied.

You claim to have followed the instructions, but didn't completely.  
Could you do like the Ubuntu README file says and try instead

sudo apt-get install r-base

(Instead of r-base-core). This works flawlessly here.

Hope this helps

---
   Vincent Goulet, Associate Professor
   École d'actuariat
   Université Laval, Québec
   Vincent.Goulet at act.ulaval.ca   http://vgoulet.act.ulaval.ca



More information about the R-SIG-Debian mailing list