0

I'm a week into Ubuntu 18.04, and just installed R and R Studio. Following the guide here; https://cran.r-project.org/bin/linux/ubuntu/README.html

I tried to install the needed packages, and these are the errors I get;

ERROR: failed to lock directory ‘/home/usr/R/x86_64-pc-linux-gnu-library/3.6’ for modifying
Try removing ‘/home/usr/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-dplyr’

I did try to remove the above, this did not work.

g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I. -I"/home/serkan/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I. -I"/home/serkan/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c feather-read.cpp -o feather-read.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I. -I"/home/usr/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include"   -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-t3diwe/r-base-3.6.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c feather-types.cpp -o feather-types.o
/usr/lib/R/etc/Makeconf:177: recipe for target 'feather-types.o' failed

I have no clue what this is. Copy-pasting parts of the code into Google does give 0 hits.

My R-session info:

R version 3.6.2 (2019-12-12)     
Platform: x86_64-pc-linux-gnu(64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default

BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:

[1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=da_DK.UTF-8        LC_COLLATE=en_GB.UTF-8     LC_MONETARY=da_DK.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=da_DK.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=da_DK.UTF-8 LC_IDENTIFICATION=C       

> attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

> other attached packages:
[1] devtools_2.2.1 usethis_1.5.1 

> loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3        rstudioapi_0.10   magrittr_1.5      pkgload_1.0.2     R6_2.4.1          rlang_0.4.3       fansi_0.4.1       tools_3.6.2       pkgbuild_1.0.6    sessioninfo_1.1.1 cli_2.0.1         withr_2.1.2      
[13] ellipsis_0.3.0    remotes_2.1.0     assertthat_0.2.1  digest_0.6.23     rprojroot_1.3-2   crayon_1.3.4      processx_3.4.1    callr_3.4.1       fs_1.3.1          ps_1.3.0          testthat_2.3.1    memoise_1.1.0    
[25] glue_1.3.1        compiler_3.6.2    desc_1.2.0        backports_1.1.5   prettyunits_1.1.1
Serkan
  • 129
  • 5
  • It seems that this is a selective problem. I can install "stringr" without issues, but installing "AER" gives the same error. – Serkan Jan 28 '20 at 21:54
  • Welcome to Ask Ubuntu. There are two ways to install R packages in Ubuntu. See this [answer](https://askubuntu.com/questions/931375/r-and-rstudio-installation-and-package-error/931919#931919) for details. Also see this [answer](https://askubuntu.com/questions/1138406/how-can-i-rectify-the-numerous-error-messages-that-appear-when-installing-packag/1138436#1138436) for some other errors. Update your question if you still have problems. – user68186 Jan 28 '20 at 22:07
  • Thank you for the welcoming. First of all, I changed user as to keep myself anonymous, but thank you for noticing this. I followed the links you've sent. And something interesting came up: "apt-cache search tidyverse" gave the following: r-cran-rlang - Functions for Base Types and Core R and 'Tidyverse' Features r-cran-tidyselect - GNU R select from a set of strings And nothing else. Similarily, from the error-link; sudo apt install r-cran-tidyverse, gave the following; E: Unable to locate package r-cran-tidyverse – Serkan Jan 28 '20 at 22:16
  • Thanks for the clarification. I was confused as `/usr` is a system folder, I wouldn't have commented if you used `user` or `username` instead of `usr`. Not all packages are available in the pre-compiled form in the Ubuntu repository. So, even though I prefer using `sudo apt install` where possible, I need to fall back to **the second method**, sometimes. – user68186 Jan 28 '20 at 22:19
  • Prior to updating R to 3.6.2 from 3.4.4, I actually had no issues with installing Tidyverse from R Studio. Thank you for commenting anyway! – Serkan Jan 28 '20 at 22:27

0 Answers0