WGCNA error installing
2
0
Entering edit mode
23 months ago
Recep • 0

Hello, I tried to install WGCNA with the following command. As said I also used the force command but it fails.

    > BiocManager::install("WGCNA")


   'getOption("repos")' replaces Bioconductor standard
    repositories, see '?repositories' for details

    replacement repositories:
        CRAN: https://cran.uni-muenster.de

    Bioconductor version 3.16 (BiocManager 1.30.18), R 4.2.1
      (2022-06-23)
    Warning message:
    package(s) not installed when version(s) same as current;
      use `force = TRUE` to re-install: 'WGCNA' 

When I run the library, it says it can't find the package "impute".

    > library(WGCNA)
Error: package or namespace load failed for ‘WGCNA’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘impute’
In addition: Warning messages:
1: In install.packages(c("impute"), lib = "/Library/Frameworks/R.framework/Resources/library/",  :
  installation of package ‘impute’ had non-zero exit status
2: In install.packages(c("impute"), lib = "/Library/Frameworks/R.framework/Resources/library/",  :
  installation of package ‘impute’ had non-zero exit status

How can i solve this problem? I am using a M1 Mac.

R Bioconductor WGCNA • 2.1k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
0
Entering edit mode

it is same.

there is no package called ‘impute’
ADD REPLY
1
Entering edit mode
23 months ago

Try to install impute

ADD COMMENT
0
Entering edit mode

I tried but couldnt.

> BiocManager::install("impute") 
'getOption("repos")' replaces Bioconductor standard
repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.uni-muenster.de

Bioconductor version 3.16 (BiocManager 1.30.18), R 4.2.1
  (2022-06-23)
Installing package(s) 'impute'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.16/data/annotation/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.16/data/experiment/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/workflows/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.16/workflows/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Warning: unable to access index for repository https://bioconductor.org/packages/3.16/books/bin/macosx/big-sur-arm64/contrib/4.2:
  cannot open URL 'https://bioconductor.org/packages/3.16/books/bin/macosx/big-sur-arm64/contrib/4.2/PACKAGES'
Package which is only available in source form, and
  may need compilation of C/C++/Fortran: ‘impute’
Do you want to attempt to install these from sources? (Yes/no/cancel) 
installing the source package ‘impute’

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/impute_1.71.0.tar.gz'
Content type 'application/x-gzip' length 641566 bytes (626 KB)
==================================================
downloaded 626 KB

/opt/R/arm64/bin/gfortran -mtune=native -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c knnimpute.f -o knnimpute.o

The downloaded source packages are in
    ‘/private/var/folders/03/7__b_csn7sng_k9lzdl377wh0000gn/T/RtmpSMlv9l/downloaded_packages’
Warning message:
In install.packages(...) :
  installation of package ‘impute’ had non-zero exit status
ADD REPLY
1
Entering edit mode

Do you want to attempt to install these from sources? (Yes/no/cancel)

What did you type? You should type yes

Also check this link. It could be a problem with the macOS Big Sur.

ADD REPLY
0
Entering edit mode

It worked with that link. Thank you Andres!

ADD REPLY
0
Entering edit mode
23 months ago
LauferVA 4.3k

Dependency loading is one of R's weak points.

Generally speaking,

Usual suspects:

  1. Update all the dependencies that are elderly.
  2. Install those you don't have
  3. If prompted, need to Recompile from source. This takes longer so people avoid it, but it is the problem much of the time. (notice how the Y in yes is capitalized; thats the recommended option).

If 1. - 3. fail

  1. May need to upgrade or downgrade your R version.
  2. Finally, it can be an issue related to masking.

Last resort

  1. Go to Github and post it as an issue if you're confident you've done 1. - 5. If you have to resort to 6., run sessionInfo() and R.version() as you create the issue.
ADD COMMENT

Login before adding your answer.

Traffic: 3109 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6