This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problems with installing adegenet

Good afternoon,

I am trying to install adegenet package:

install.packages("adegenet")

also installing the dependencies ‘units’, ‘sf’, ‘spdep’, ‘dplyr’

Warning message in install.packages("adegenet"):
“installation of package ‘units’ had non-zero exit status”Warning message in install.packages("adegenet"):
“installation of package ‘dplyr’ had non-zero exit status”Warning message in install.packages("adegenet"):
“installation of package ‘sf’ had non-zero exit status”Warning message in install.packages("adegenet"):
“installation of package ‘spdep’ had non-zero exit status”Warning message in install.packages("adegenet"):
“installation of package ‘adegenet’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Please tell me what I need to do for a normal installation? Thank you in advance!

R version 3.6.1 (2019-07-05), Ubuntu 20.04.1

Best regards, Poecile

r error software adegenet gene

Could you please trying install.packages(units) (or install.packages(dplyr)) and show us the output from the console?

Thank you for your consideration, that's the output of install.packages("dplyr"):

Warning message in install.packages("dplyr"):
“installation of package ‘dplyr’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

I have tried to install dplyr using devtools, but installation of devtools causes a lot of other warnings:

install.packages("devtools")
also installing the dependencies ‘credentials’, ‘diffobj’, ‘curl’, ‘gert’, ‘gh’, ‘xopen’, ‘waldo’, ‘usethis’, ‘httr’, ‘pkgbuild’, ‘rcmdcheck’, ‘roxygen2’, ‘rversions’, ‘testthat’

Warning message in install.packages("devtools"):
“installation of package ‘diffobj’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘curl’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘credentials’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘waldo’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘httr’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘rversions’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘gert’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘gh’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘testthat’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘usethis’ had non-zero exit status”Warning message in install.packages("devtools"):
“installation of package ‘devtools’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

This is very sad, because I really need dplyr and other regular packages(

2 answers

On Ubuntu 20.04, the simplest approach is to install the r-cran-adegenet package from repositories using Synaptic or apt. This will give you adegenet 2.1.2.

If you do wish to use the install.packages() method, you will need to install these additional packages before proceeding - libudunits2-dev and libgdal-dev. These are needed by the units and sf R packages respectively.

Thank you for your help, I installed r-cran-adegenet:

sudo apt install r-cran-adegenet

but I can't figure out how to use it now. Could you please explain how to call the R package installed in this way? Neither library ("r-cran-adegenet") nor library ("adegenet") work. Sorry for my unawareness.

In fact, I would rather install adegenet in the second way, and at the same time install all the other packages I need. I successfully installed libudunits2-dev and libgdal-dev via apt:

sudo apt-get install libudunits2-dev
sudo apt-get install libgdal-dev

But for some reason, it still failed to install adegenet, units, sf, and others:

install.packages("adegenet", dep = TRUE)
also installing the dependencies ‘units’, ‘diffobj’, ‘sf’, ‘waldo’, ‘spdep’, ‘dplyr’, ‘pegas’, ‘hierfstat’, ‘testthat’, ‘poppr’

Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘units’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘diffobj’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘dplyr’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘sf’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘waldo’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘spdep’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘testthat’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘adegenet’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘pegas’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘hierfstat’ had non-zero exit status”Warning message in install.packages("adegenet", dep = TRUE):
“installation of package ‘poppr’ had non-zero exit status”Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Can you please tell me what I'm doing wrong? Thank you!

I solved the problem by reinstalling miniconda and R. Thank you all!

Log in to answer this question.