缺少 RODBC 1.3-16
Posted
技术标签:
【中文标题】缺少 RODBC 1.3-16【英文标题】:RODBC 1.3-16 is missing 【发布时间】:2021-02-10 13:37:20 【问题描述】:我正在尝试安装 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
上面的网址确实是返回页面未找到。我真的需要 1.3-16 版本,因为我在 R 3.6.0 上安装它。
有什么解决办法吗?
【问题讨论】:
【参考方案1】:该软件包的最新版本是 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
【讨论】:
以上是关于缺少 RODBC 1.3-16的主要内容,如果未能解决你的问题,请参考以下文章