install.packages R on Ubuntu 12.04 downloads but does not install packages

后端 未结 3 1641
醉梦人生
醉梦人生 2020-12-07 01:12

I\'m perplexed. I\'ve done this process a dozen times and never had this issue.

I installed the latest version of R for Ubuntu

I enter R, no issues at all,

3条回答
  •  暖寄归人
    2020-12-07 01:21

    If your server does not have enough ram, R can not install packages.

    The solution is to either increase the physical ram, or increase the size of the swap file.

    Create a 2 gig swap file

    sudo fallocate -l 2G /swap.img
    sudo mkswap /swap.img
    sudo swapon /swap.img
    

    You can see how much free swap is available with the swapon command

    root@foo:# swapon -s
    Filename                Type        Size    Used    Priority
    /swap.img                               file        2097148 213388  -1
    

提交回复
热议问题