1

devtools を使用して、R の github からパッケージをインストールしています (リンクはこちら: https://github.com/aliceyiwang/mvabund )。別のパッケージの手順を使用して Rtools をインストールしました (ここ: https://cran.r-project.org/web/packages/dynr/vignettes/InstallationForUsers.pdf )。そこにあるすべてのチェックは、GSL と RTools がインストールされていることを示しています。ちゃんと。

Windows システム環境変数 LIB_GSL (as "C:/R/local323") および PATHS (as "C:/RTools/bin/", "C:/RTools/mingw_64/bin", "C:/R/R-3.5.1/bin")を設定しました。

パッケージをインストールする前に、R で次のコードも実行します。

Sys.setenv("LIB_GSL" = "C:/R/local323")
Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")
Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:/RTools/bin/",
                        "C:/RTools/mingw_64/bin", "C:/R/R-3.5.1/bin", sep = ";"))

質問:

私が実行すると:

devtools::install_github("aliceyiwang/mvabund")

コードは適切に開始され、パッケージのインストールを開始します。ただし、これが発生すると、ポイントが発生します。

[...excluded very long list of undefined references like that below...]
summary.o:summary.cpp:(.text+0x194c): undefined reference to `gsl_vector_free'
    collect2.exe: error: ld returned 1 exit status
    no DLL was created
    ERROR: compilation failed for package 'mvabund'
    * removing 'C:/R/R-3.5.1/library/mvabund'
    In R CMD INSTALL
    Error in i.p(...) : 
      (converted from warning) installation of package ‘C:/Users/Joshua/AppData/Local/Temp/RtmpsPp5oY/file2154340c11f8/mvabund_4.0.tar.gz’ had non-zero exit status

私の推測では、どこかで、これらの関数へのパスが適切に定義されていません。私は何を間違っていますか?

私のセッション情報は

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252
[4] LC_NUMERIC=C                       LC_TIME=English_Australia.1252    

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

other attached packages:
[1] usethis_1.4.0  devtools_2.0.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0        rstudioapi_0.8    magrittr_1.5      pkgload_1.0.2     R6_2.3.0          rlang_0.3.0.1    
 [7] tools_3.5.1       pkgbuild_1.0.2    sessioninfo_1.1.1 cli_1.0.1         withr_2.1.2       remotes_2.0.2    
[13] yaml_2.2.0        assertthat_0.2.0  digest_0.6.18     rprojroot_1.3-2   crayon_1.3.4      processx_3.2.1   
[19] callr_3.1.0       fs_1.2.6          ps_1.2.1          curl_3.2          testthat_2.0.1    memoise_1.1.0    
[25] glue_1.3.0        compiler_3.5.1    desc_1.2.0        backports_1.1.2   prettyunits_1.0.2
> 
4

1 に答える 1