作者rlearner (rlearner)
看板Web_Design
标题[问题] web server上建立r-leaflet套件
时间Wed Dec 14 11:49:36 2016
这个问题不知能不在该板题问@@
[环境架设/问题简叙]
我在实体机上ubuntu上架设了shiny server
测试用的shiny范例程式所放路径:
$cd /opt/shiny-server/samples/sample-apps
并放了几个范例程式,如下
http://140.128.197.58:3838/sample-apps/
(问题所在!!!!)但在尝试leaflet地图套件时出错:
http://140.128.197.58:3838/sample-apps/leaflet1/
ps.不过leaflet应用在js上就可以了@_@
http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html
[程式码]
以下是
http://140.128.197.58:3838/sample-apps/leaflet1/
的程式码,直接放上rstudio跑是没问题的
ui.R------------------------------------------
library(leaflet)
library(shiny)
fluidPage(
h1("hpc map test"),
leafletOutput('map',width = "100%",height = 800)
)
server.R----------------------------------
library(shiny)
library(leaflet)
function(input,output){
output$map <- renderLeaflet({
leaflet() %>%
addTiles() %>%
setView(lng=120.601,lat=24.179,zoom=16)
})
}
[错误讯息]
1.网页讯息
点入刚刚讲的
http://140.128.197.58:3838/sample-apps/leaflet1/
的网址会出现如下的错误讯息:
ERROR: An error has occurred. Check your logs or contact the app author for
clarification.
2.按F12选console,出现错误讯息
Failed to load resource: the server responded with a status of 500 (Internal
Server Error)
3.去伺服器进入cd /var/log/shiny-server
并无leaflet相关的错讯息讯
[环境版本]
ubuntu 14.04.05
shiny-server 1.5.1
R 3.3.2
leaflet 1.0.1
不知道该如何处理,求解QQ!!
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.128.101.143
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Web_Design/M.1481687379.A.AD3.html