R安装ggplot2出错的解决办法

> install.packages("ggplot2")
Installing package into ‘C:/Users/*/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependency ‘scales’


  有二进制版本的,但源代码版本是后来的:
       binary source needs_compilation
scales  0.2.4  0.2.5             FALSE

试开URL’http://mirrors.ustc.edu.cn/CRAN/bin/windows/contrib/3.2/ggplot2_1.0.1.zip'
Content type 'application/zip' length 2677897 bytes (2.6 MB)
downloaded 2.6 MB

程序包‘ggplot2’打开成功,MD5和检查也通过

下载的二进制程序包在
        C:\Users\*\AppData\Local\Temp\RtmpgFeANP\downloaded_packages里
installing the source package ‘scales’

试开URL’http://mirrors.ustc.edu.cn/CRAN/src/contrib/scales_0.2.5.tar.gz'
Content type 'application/gzip' length 56346 bytes (55 KB)
downloaded 55 KB

* installing *source* package 'scales' ...
** 成功将'scales'程序包解包并MD5和检查
** libs
Warning: 运行命令'make -f "C:/PROGRA~1/R/R-32~1.0/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="scales.dll" WIN=64 TCLBIN=64 OBJECTS="RcppExports.o colors.o"'的状态是127
ERROR: compilation failed for package 'scales'
* removing 'C:/Users/*/Documents/R/win-library/3.2/scales'

下载的程序包在
        ‘C:\Users\*\AppData\Local\Temp\RtmpgFeANP\downloaded_packages’里
Warning messages:
1: 运行命令'"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\*\Documents\R\win-library\3.2" C:\Users\CELEST~1\AppData\Local\Temp\RtmpgFeANP/downloaded_packages/scales_0.2.5.tar.gz'的状态是1
2: In install.packages("ggplot2") : 安装程序包‘scales’时退出狀態的值不是0

这是由于scales无法下载的缘故

可以用install.packages("ggplot2", repos = "http://cran.r-project.org")来解决

转载于:https://www.cnblogs.com/yumtaoist/p/4576874.html

  • 3
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值