包安装在R中不起作用

时间:2018-05-16 20:46:41

标签: r package

没关系,修好了。将写下评论解释修复tn。

我正在尝试在R中安装几何morphometrics包,但每当我尝试安装它时,都会收到以下错误消息:

> install.packages("geomorph")

There is a binary version available but the source version is later: binary source needs_compilation geomorph  3.0.5  3.0.6             FALSE

installing the source package ‘geomorph’

trying URL 'https://cran.rstudio.com/src/contrib/geomorph_3.0.6.tar.gz'
Content type 'application/x-gzip' length 545863 bytes (533 KB)
==================================================
downloaded 533 KB

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'default/America/Toronto'
* installing *source* package ‘geomorph’ ...
** package ‘geomorph’ successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
there is no package called ‘mvtnorm’
ERROR: lazy loading failed for package ‘geomorph’
* removing      ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/geomorph’
Warning in install.packages :
installation of package ‘geomorph’ had non-zero exit status

The downloaded source packages are in
      ‘/private/var/folders/4p/m9yg9rg94v13j49zxnp9kzzh0000gn/T/RtmpCBCHAn/downloaded_packages’

我正在使用RStudio,但是我在R中尝试了它,我已经更新到最新的MacOS HighSierra,我已经尝试重新启动应用程序,我已经安装并重新启动XQuartz,到目前为止没有任何工作。

我正在2015年初的MacBook Air上运行R,我的想法很新鲜。欢迎任何建议。

修改

尝试安装mvtnorm也失败了,产生以下内容:

> install.packages("mvtnorm")

There is a binary version available but the source version is later:
binary source needs_compilation
mvtnorm  1.0-6  1.0-7              TRUE

Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘mvtnorm’

trying URL 'https://cran.rstudio.com/src/contrib/mvtnorm_1.0-7.tar.gz'
Content type 'application/x-gzip' length 159381 bytes (155 KB)
==================================================
downloaded 155 KB

* installing *source* package ‘mvtnorm’ ...
** package ‘mvtnorm’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -   I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -    Wall -mtune=core2 -g -O2  -c C_FORTRAN_interface.c -o C_FORTRAN_interface.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -    I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    -fPIC  -    Wall -mtune=core2 -g -O2  -c miwa.c -o miwa.o
gfortran-4.8   -fPIC  -g -O2  -c mvt.f -o mvt.o
make: gfortran-4.8: No such file or directory
make: *** [mvt.o] Error 1
ERROR: compilation failed for package ‘mvtnorm’
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/mvtnorm’
* restoring previous  ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/mvtnorm’
Warning in install.packages :
installation of package ‘mvtnorm’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/4p/m9yg9rg94v13j49zxnp9kzzh0000gn/T/RtmpCBCHAn/downloaded_packages’

0 个答案:

没有答案