缺少 RODBC 1.3-16

问题描述

我正在尝试安装 RODBC

install.packages('RODBC')

并返回错误:

Retrieving 'https://cran.rstudio.com/src/contrib/RODBC_1.3-16.tar.gz' ...
Warning messages:
1: curl: (22) The requested URL returned error: 404 Not Found 
2: curl: (22) The requested URL returned error: 404 Not Found 

上面的 URL 确实是返回页面未找到。我真的需要 1.3-16 版本,因为我是在 R 3.6.0 上安装它。

有什么解决办法吗?

解决方法

该包的最新版本是 1.3-17。来自官方 CRAN 文档 (link):

RODBC:ODBC 数据库访问 ODBC 数据库接口。

版本:1.3-17 取决于:R (≥ 4.0.0)

安装 R 的 4.X.X 版本,然后使用 install.packages 函数再次尝试安装。

如果您想使用较旧的 R 版本,请使用此方法安装以前的软件包版本:

require(devtools)
install_version("RODBC",version = "1.3-16")

> Downloading package from url:
> https://cran.rstudio.com/src/contrib/Older/RODBC_1.3-16.tar.gz
> Installing package into
> ‘C:/Users/212717174/Documents/R/win-library/3.6’ (as ‘lib’ is
> unspecified)
> * installing *source* package 'RODBC' ...
> ** package 'RODBC' successfully unpacked and MD5 sums checked
> ** using staged installation
> ** libs
> 
> *** arch - i386 c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-36~1.2/include" -DNDEBUG -I.         -O3 -Wall  -std=gnu99 -mtune=generic -c RODBC.c -o RODBC.o c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o RODBC.dll
> tmp.def RODBC.o -lodbc32 -LC:/PROGRA~1/R/R-36~1.2/bin/i386 -lR
> installing to
> C:/Users/212717174/Documents/R/win-library/3.6/00LOCK-RODBC/00new/RODBC/libs/i386
> 
> *** arch - x64 c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-36~1.2/include" -DNDEBUG -I.         -O2 -Wall  -std=gnu99 -mtune=generic -c RODBC.c -o RODBC.o RODBC.c: In function 'cachenbind': RODBC.c:672:8: warning: cast to pointer from integer of
> different size [-Wint-to-pointer-cast]
>         (SQLPOINTER) (unsigned long) thisHandle->rowArraySize,0 );
>         ^ c:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o RODBC.dll tmp.def RODBC.o -lodbc32 -LC:/PROGRA~1/R/R-36~1.2/bin/x64
> -lR installing to C:/Users/212717174/Documents/R/win-library/3.6/00LOCK-RODBC/00new/RODBC/libs/x64
> ** R
> ** inst
> ** byte-compile and prepare package for lazy loading
> ** help
> *** installing help indices   converting help for package 'RODBC'
>     finding HTML links ... done
>     RODBC-internal                          html  
>     RODBC-package                           html  
>     odbc                                    html  
>     odbcClose                               html  
>     odbcConnect                             html  
>     odbcDataSources                         html  
>     odbcGetInfo                             html  
>     odbcSetAutoCommit                       html  
>     setSqlTypeInfo                          html  
>     sqlColumns                              html  
>     sqlCopy                                 html  
>     sqlDrop                                 html  
>     sqlFetch                                html  
>     sqlQuery                                html  
>     sqlSave                                 html  
>     sqlTables                               html  
>     sqlTypeInfo                             html  
> ** building package indices
> ** installing vignettes
> ** testing if installed package can be loaded from temporary location
> *** arch - i386
> *** arch - x64
> ** testing if installed package can be loaded from final location
> *** arch - i386
> *** arch - x64
> ** testing if installed package keeps a record of temporary installation path
> * DONE (RODBC)

在这个 R 版本上测试过:

R.version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64,mingw32             
status                                     
major          3                           
minor          6.2                         
year           2019                        
month          12                          
day            12                          
svn rev        77560                       
language       R                           
version.string R version 3.6.2 (2019-12-12)
nickname       Dark and Stormy Night 

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...