【发布时间】:2018-12-22 23:33:38
【问题描述】:
我已经使用 sql server 连接创建了这个应用程序,它在我的设备上正常工作,但发布后我收到此错误 应用程序无法启动,这就是我在此错误页面中得到的内容:
Attaching package: ‘rsconnect’
The following object is masked from ‘package:shiny’:
serverInfo
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Attaching package: ‘RODBCext’
The following objects are masked from ‘package:RODBC’:
odbcFetchRows, sqlFetchMore
Attaching package: ‘shinydashboard’
The following object is masked from ‘package:graphics’:
box
Warning in odbcDriverConnect("driver={SQL Server};server=************;database=*******;uid=****;pwd=*****") :
[RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver Manager]Data source name not found, and no default driver specified
Warning in odbcDriverConnect("driver={SQL Server};server=************\\.,1435;database=************;uid=****;pwd=****") :
ODBC connection failed
Error in value[[3L]](cond) : first argument is not an open RODBC channel
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
我的代码将在这里: my app code
【问题讨论】:
-
正如错误所说,您的
ODBC未在部署应用程序的 linux 机器上配置 -
我在 Windows 而不是 linux 上工作
-
Shinyapps.io 在 linix 盒子上
-
我该如何解决?
-
当您配置
ODBC连接时,您可能指定在windows 机器中,而不是R。我建议您使用另一个包,例如RMySQLcran.r-project.org/web/packages/RMySQL/index.html
标签: r shiny shiny-server