2

I'm running since a few days archlinux and installed R-Studio today. I'm not able to install the tidyverse packages.

Error in library(tidyverse) : there is no package called ‘tidyverse’
Calls: .First -> library
Execution halted
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

I found a few solutions for Ubuntu or Debian, but no solution for archlinux.

I's seems that you need for Ubuntu or Debian libxml2-dev libcurl4-openssl-dev libssl-dev but I can't find em for archlinux.

I hope someone can help me.

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
alex
  • 89
  • 7
  • 1
    It used to be the case (don't know if it still is) that archlinux *"doesn't split the headers out from it's packages"* ([ref](https://bbs.archlinux.org/viewtopic.php?id=87623)). Look for `libxml2`, `libcurl-compat` (uses openssl), and perhaps `openssl`. – r2evans Dec 22 '21 at 16:44
  • You should run `install.packages("tidyverse")` and show us where it goes wrong. Packages often make suggestions about how to install missing system libraries when they fail to configure properly. – user2554330 Dec 22 '21 at 16:52
  • @user2554330, I thought the same thing, that's where I'm guessing the recommendation for `libxml2-dev` (etc) is coming from. The`DESCRIPTION` file in the `xml2` package, for example, lists `SystemRequirements: libxml2: libxml2-dev (deb), libxml2-devel (rpm)` but doesn't venture outside of deb/rpm recommendations to provide the `libxml2` need. I agree that a full command and list of errors may be more helpful, but I would prefer to see that *after* OP attempts to install `libxml2 libcurl-compat openssl` so that we can rule out that possibility. – r2evans Dec 22 '21 at 16:56
  • Thanks for fast replying! I run `sudo pacman -S libxml2 libcurl-compat openssl` and tried to install `install.packages("tidyverse")` but got the same error like I already posted. Installing package into ‘/home/user/R/x86_64-pc-linux-gnu-library/4.1’ (as ‘lib’ is unspecified) also installing the dependencies ‘colorspace’, ‘sys’, ‘bit’, ‘rappdirs’, ‘rematch’, ‘farver’, ‘labeling’, ‘munsell’, ‘RColorBrewer’, ‘viridisLite’, ‘askpass’, ‘bit64’, ‘prettyunits’, ‘backports’, ‘generics’, ‘assertthat’, ‘blob’, ‘DBI’, etc ... – alex Dec 22 '21 at 17:52
  • 2
    I know it may seem inane, but let's do one at a time. First, I suggest you restart R, not sure if it'll change anything but it often does have an effect on some more obscure issues. Please post the output from `install.packages("xml2")` with the expression and all output. If it includes suggestions to install specific OS (non-R) packages, then include the shell command you use to install and all of its output (and then reattempt `install.packages("xml2")` if pacman's output was promising). Again, it sounds inane, but let's just approach one package error at a time. – r2evans Dec 22 '21 at 18:47
  • Don't forget upgrading your system before (`sudo pacman -Syu`), then reboot. Is there any other potential important information in the error message? – Jose Dec 22 '21 at 19:06
  • Found a solution for the problem! Just run `sudo rstudio` and installed the packages. Thx for your help guys – alex Dec 22 '21 at 19:45
  • If you've solved your own problem, you're encouraged to post a complete solution. – Ben Bolker Dec 22 '21 at 22:40
  • 1
    That's not a good solution – Dason Dec 23 '21 at 15:55
  • 1
    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 31 '21 at 14:38

2 Answers2

0

Arch linux does not separate the dev packages. Hence, you can install the libraries directly, using:

yay -S ibxml2 libcurl4-openssl libssl 
felipecrp
  • 999
  • 10
  • 16
-2

Okey, I found a solution for this specific Problem. I just started r-studio as sudo and was able to install "tidyverse".

I still have problems to install other packages that cant be solved with running as sudo for example psych. I'm not sure which libs are missing.

alex
  • 89
  • 7
  • 2
    No this is not the way to do it. You very much don't want to install packages within R while running as root. – Dason Dec 23 '21 at 15:49