首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Install.packages(.)Windows 10失败

Install.packages(.)Windows 10失败
EN

Stack Overflow用户
提问于 2018-05-05 16:20:06
回答 1查看 609关注 0票数 2

我正在尝试从VisualStudio2017安装dplyr包。它依赖于pillar

当我从命令行执行安装时,我得到:

代码语言:javascript
复制
> install.packages('pillar')
Installing package into ‘C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)

  There is a binary version available but the source version is later:
       binary source needs_compilation
pillar  1.2.1  1.2.2             FALSE

installing the source package ‘pillar’

trying URL 'http://cran.r-project.org/src/contrib/pillar_1.2.2.tar.gz'
Content type 'application/x-gzip' length 64185 bytes (62 KB)
downloaded 62 KB

* installing *source* package 'pillar' ...
** package 'pillar' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'C:/Users/Jirtme Verstrynge/Documents/R/win-library/3.3/pillar/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") : 
  cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'pillar'
* removing 'C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.3/pillar'

有一个虚假的Jérôme Verstrynge转换为Jirtme Verstrynge

我怎么才能解决这个问题?

更多信息

当我从Windows10 PowerShell执行时,我得到:

代码语言:javascript
复制
LCID             Name             DisplayName
----             ----             -----------
2057             en-GB            English (United Kingdom)

Sys.getlocale()返回:

代码语言:javascript
复制
[1] "LC_COLLATE=English_United Kingdom.1252;
     LC_CTYPE=English_United Kingdom.1252;
     LC_MONETARY=English_United Kingdom.1252;
     LC_NUMERIC=C;
     LC_TIME=English_United Kingdom.1252"

解决方案

我已经卸载了Microsoft客户端并从这里重新安装了它。客户端现在在3.4.3.0版本上。

对于包支柱来说,这个问题已经消失了,但是它带着一个名为dendextend的包回来了,同时尝试使用install.packages('seriation')

错误是:

代码语言:javascript
复制
> install.packages('seriation') 
Installing package into ‘C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘dendextend’


  There is a binary version available but the source version is later:
           binary source needs_compilation
dendextend  1.7.0  1.8.0             FALSE

trying URL 'http://cran.r-project.org/bin/windows/contrib/3.4/seriation_1.2-3.zip'
Content type 'application/zip' length 1015954 bytes (992 KB)
downloaded 992 KB

package ‘seriation’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Temp\Rtmpi2lOd8\downloaded_packages
installing the source package ‘dendextend’

trying URL 'http://cran.r-project.org/src/contrib/dendextend_1.8.0.tar.gz'
Content type 'application/x-gzip' length 1758392 bytes (1.7 MB)
downloaded 1.7 MB

* installing *source* package 'dendextend' ...
** package 'dendextend' successfully unpacked and MD5 sums checked
Warning in file(file, if (append) "a" else "w") :
  cannot open file 'C:/Users/Jirtme Verstrynge/Documents/R/win-library/3.4/dendextend/DESCRIPTION': No such file or directory
Error in file(file, if (append) "a" else "w") : 
  cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'dendextend'
* removing 'C:/Users/Jérôme Verstrynge/Documents/R/win-library/3.4/dendextend'
In R CMD INSTALL

The downloaded source packages are in
    ‘C:\Temp\Rtmpi2lOd8\downloaded_packages’
Warning messages:
1: running command '"C:/PROGRA~1/MIE74D~1/RCLIEN~1/R_SERVER/bin/x64/R" CMD INSTALL -l "C:\Users\Jérôme Verstrynge\Documents\R\win-library\3.4" C:\Temp\Rtmpi2lOd8/downloaded_packages/dendextend_1.8.0.tar.gz' had status 1 
2: In utils::install.packages(...) :
  installation of package ‘dendextend’ had non-zero exit status
> 

utils::install.packages(...)中似乎有一个问题

问题解决了

显然,在重新安装Microsoft客户端的基础上,剩下的问题与缺少的二进制包有关。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-05-05 19:25:24

我怀疑这与支柱包有任何关系,但可能是因为这个包是从源代码安装的(与默认的二进制安装不同)。随着支柱1.2.2的二进制版本在您的CRAN镜像上可用(在CRAN和https://cloud.r-project.org/web/packages/pillar/index.html上已经存在),这个问题最终会得到解决。

getOption("repos")在您的系统中的价值是什么?

在这个特定的场景中,非ASCII字符的错误编码似乎是一个问题,最好通过为您的家庭选择一个ASCII专用和无空间目录名来避免(例如,C:\Users\jverstry而不是当前的设置)。要排除Visual的问题,可以尝试从RGui或R终端安装包,请反复检查包的安装路径是否相同。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50191556

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档