I did that normally
to check for this, I removed R_LIBS redirections from all my configs and deinstalled R from my machine using sudo apt remove r-base-core r-base
I then reinstalled with sudo apt install r-base r-base-dev and it seemed to work but when I tried installing dplyr, it failed complaining about missing files in /usr/lib/R/etc/
It seems that the current installer (4.2.1-2.2004.0) did not create some extra files in /etc/R/ and the fresh symlinks in /usr/lib/R/etc/ are broken
Could it be that the latest R installer is not doing its job OK?
here is my /usr/lib/etc after clean install
$ ll /usr/lib/R/etc/
total 16K
drwxr-xr-x 2 root root 4.0K Sep 6 10:24 .
drwxr-xr-x 8 root root 4.0K Sep 6 10:24 ..
-rw-r--r-- 1 root root 234 Aug 11 02:31 javaconf
lrwxrwxrwx 1 root root 14 Aug 11 02:31 ldpaths -> /etc/R/ldpaths
lrwxrwxrwx 1 root root 15 Aug 11 02:31 Makeconf -> /etc/R/Makeconf
lrwxrwxrwx 1 root root 15 Aug 11 02:31 Renviron -> /etc/R/Renviron
lrwxrwxrwx 1 root root 20 Aug 11 02:31 Renviron.site -> /etc/R/Renviron.site
-rw-r--r-- 1 root root 1.9K Aug 11 02:31 Renviron.ucf
lrwxrwxrwx 1 root root 19 Aug 11 02:31 repositories -> /etc/R/repositories
lrwxrwxrwx 1 root root 20 Aug 11 02:31 Rprofile.site -> /etc/R/Rprofile.site
and in my /etc/R/ I have only one file
$ ll /etc/R/
total 20K
drwxr-xr-x 2 root root 4.0K Sep 6 10:24 **.**
drwxr-xr-x 187 root root 12K Sep 6 10:24 **..**
-rw-r--r-- 1 root root 1.9K Sep 6 10:24 Renviron
note: I chose my national repo (Belgium:7) during fresh install
log of the failed dplyr install
$ sudo R
/usr/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> install.packages("dplyr")
Installing package into ‘/usr/lib/R/site-library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
X11 connection rejected because of wrong authentication.
Secure CRAN mirrors
1: 0-Cloud [https]
2: Australia (Canberra) [https]
3: Australia (Melbourne 1) [https]
4: Australia (Melbourne 2) [https]
5: Australia (Perth) [https]
6: Austria [https]
7: Belgium (Brussels) [https]
8: Brazil (PR) [https]
9: Brazil (RJ) [https]
10: Brazil (SP 1) [https]
11: Brazil (SP 2) [https]
12: Bulgaria [https]
13: Canada (MB) [https]
14: Canada (ON 3) [https]
15: Chile (Santiago) [https]
16: China (Beijing 2) [https]
17: China (Beijing 3) [https]
18: China (Hefei) [https]
19: China (Hong Kong) [https]
20: China (Guangzhou) [https]
21: China (Lanzhou) [https]
22: China (Nanjing) [https]
23: China (Shanghai 2) [https]
24: China (Shenzhen) [https]
25: Colombia (Cali) [https]
26: Costa Rica [https]
27: Cyprus [https]
28: Czech Republic [https]
29: Denmark [https]
30: East Asia [https]
31: Ecuador (Cuenca) [https]
32: Ecuador (Quito) [https]
33: France (Lyon 1) [https]
34: France (Lyon 2) [https]
35: France (Marseille) [https]
36: France (Paris 1) [https]
37: Germany (Erlangen) [https]
38: Germany (Leipzig) [https]
39: Germany (Göttingen) [https]
40: Germany (Münster) [https]
41: Germany (Regensburg) [https]
42: Greece [https]
43: Hungary [https]
44: Iceland [https]
45: India [https]
46: Indonesia (Banda Aceh) [https]
47: Iran (Mashhad) [https]
48: Italy (Milano) [https]
49: Italy (Padua) [https]
50: Japan (Tokyo) [https]
51: Japan (Yonezawa) [https]
52: Korea (Gyeongsan-si) [https]
53: Korea (Seoul 1) [https]
54: Korea (Ulsan) [https]
55: Malaysia [https]
56: Mexico (Mexico City) [https]
57: Mexico (Texcoco) [https]
58: Morocco [https]
59: Netherlands (Dronten) [https]
60: New Zealand [https]
61: Norway [https]
62: South Africa (Johannesburg) [https]
63: Spain (A Coruña) [https]
64: Spain (Madrid) [https]
65: Sweden (Borås) [https]
66: Sweden (Umeå) [https]
67: Switzerland [https]
68: Taiwan (Taipei) [https]
69: Turkey (Denizli) [https]
70: Turkey (Istanbul) [https]
71: Turkey (Mersin) [https]
72: UK (Bristol) [https]
73: UK (London 1) [https]
74: USA (IA) [https]
75: USA (MI) [https]
76: USA (OH) [https]
77: USA (OR) [https]
78: USA (TN) [https]
79: USA (TX 1) [https]
80: Uruguay [https]
81: (other mirrors)
Selection: 7
also installing the dependencies ‘fansi’, ‘pkgconfig’, ‘ellipsis’, ‘purrr’, ‘cli’, ‘utf8’, ‘generics’, ‘glue’, ‘lifecycle’, ‘magrittr’, ‘R6’, ‘rlang’, ‘tibble’, ‘tidyselect’, ‘vctrs’, ‘pillar’
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/fansi_1.0.3.tar.gz'
Content type 'application/octet-stream' length 481163 bytes (469 KB)
==================================================
downloaded 469 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/pkgconfig_2.0.3.tar.gz'
Content type 'application/octet-stream' length 6080 bytes
==================================================
downloaded 6080 bytes
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/ellipsis_0.3.2.tar.gz'
Content type 'application/octet-stream' length 8066 bytes
==================================================
downloaded 8066 bytes
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/purrr_0.3.4.tar.gz'
Content type 'application/octet-stream' length 375062 bytes (366 KB)
==================================================
downloaded 366 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/cli_3.3.0.tar.gz'
Content type 'application/octet-stream' length 495823 bytes (484 KB)
==================================================
downloaded 484 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/utf8_1.2.2.tar.gz'
Content type 'application/octet-stream' length 240327 bytes (234 KB)
==================================================
downloaded 234 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/generics_0.1.3.tar.gz'
Content type 'application/octet-stream' length 172201 bytes (168 KB)
==================================================
downloaded 168 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/glue_1.6.2.tar.gz'
Content type 'application/octet-stream' length 106510 bytes (104 KB)
==================================================
downloaded 104 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/lifecycle_1.0.1.tar.gz'
Content type 'application/octet-stream' length 99716 bytes (97 KB)
==================================================
downloaded 97 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/magrittr_2.0.3.tar.gz'
Content type 'application/octet-stream' length 267074 bytes (260 KB)
==================================================
downloaded 260 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/R6_2.5.1.tar.gz'
Content type 'application/octet-stream' length 63422 bytes (61 KB)
==================================================
downloaded 61 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/rlang_1.0.5.tar.gz'
Content type 'application/octet-stream' length 741683 bytes (724 KB)
==================================================
downloaded 724 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/tibble_3.1.8.tar.gz'
Content type 'application/octet-stream' length 672336 bytes (656 KB)
==================================================
downloaded 656 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/tidyselect_1.1.2.tar.gz'
Content type 'application/octet-stream' length 92085 bytes (89 KB)
==================================================
downloaded 89 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/vctrs_0.4.1.tar.gz'
Content type 'application/octet-stream' length 916782 bytes (895 KB)
==================================================
downloaded 895 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/pillar_1.8.1.tar.gz'
Content type 'application/octet-stream' length 479977 bytes (468 KB)
==================================================
downloaded 468 KB
trying URL 'https://ftp.belnet.be/mirror/CRAN/src/contrib/dplyr_1.0.10.tar.gz'
Content type 'application/octet-stream' length 884984 bytes (864 KB)
==================================================
downloaded 864 KB
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
/usr/lib/R/bin/R: line 142: /usr/lib/R/etc/ldpaths: No such file or directory
/usr/lib/R/bin/R: line 248: /usr/lib/R/etc/ldpaths: No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... is.factor -> grep -> is.factor -> readLines -> file
In addition: Warning message:
In file(con, "r") :
cannot open file '/usr/lib/R/etc/Makeconf': No such file or directory
The downloaded source packages are in
‘/tmp/RtmpUR6rnw/downloaded_packages’
There were 17 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In install.packages("dplyr") :
installation of package ‘fansi’ had non-zero exit status
2: In install.packages("dplyr") :
installation of package ‘pkgconfig’ had non-zero exit status
3: In install.packages("dplyr") :
installation of package ‘utf8’ had non-zero exit status
4: In install.packages("dplyr") :
installation of package ‘generics’ had non-zero exit status
5: In install.packages("dplyr") :
installation of package ‘glue’ had non-zero exit status
6: In install.packages("dplyr") :
installation of package ‘magrittr’ had non-zero exit status
7: In install.packages("dplyr") :
installation of package ‘R6’ had non-zero exit status
8: In install.packages("dplyr") :
installation of package ‘rlang’ had non-zero exit status
9: In install.packages("dplyr") :
installation of package ‘ellipsis’ had non-zero exit status
10: In install.packages("dplyr") :
installation of package ‘purrr’ had non-zero exit status
11: In install.packages("dplyr") :
installation of package ‘cli’ had non-zero exit status
12: In install.packages("dplyr") :
installation of package ‘lifecycle’ had non-zero exit status
13: In install.packages("dplyr") :
installation of package ‘vctrs’ had non-zero exit status
14: In install.packages("dplyr") :
installation of package ‘tidyselect’ had non-zero exit status
15: In install.packages("dplyr") :
installation of package ‘pillar’ had non-zero exit status
16: In install.packages("dplyr") :
installation of package ‘tibble’ had non-zero exit status
17: In install.packages("dplyr") :
installation of package ‘dplyr’ had non-zero exit status