【发布时间】:2016-11-12 12:10:33
【问题描述】:
我正在尝试获取一个简单的 OpenCPU 应用程序(来自https://www.opencpu.org/download.html)。
由于我在 AWS 上使用 Ubuntu,因此我按照 Ubuntu 的说明进行操作:
# Requires Ubuntu 14.04 (Trusty) or 16.04 (Xenial)
sudo add-apt-repository -y ppa:opencpu/opencpu-1.6
sudo apt-get update
sudo apt-get upgrade
# Installs OpenCPU server
sudo apt-get install -y opencpu
# Done! Open http://yourhost/ocpu in your browser
# Optional: installs rstudio in http://yourhost/rstudio
sudo apt-get install -y rstudio-server
顺利通过。
接下来我尝试在 Rstudio 中安装包:
install.packages("opencpu")
Installing package into ‘/home/ruser/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/opencpu_1.6.1.tar.gz'
Content type 'unknown' length 563159 bytes (549 KB)
==================================================
downloaded 549 KB
* installing *source* package ‘opencpu’ ...
** package ‘opencpu’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (opencpu)
The downloaded source packages are in
‘/tmp/RtmpON3Ujv/downloaded_packages’
> library(opencpu)
Initiating OpenCPU server...
Using config: /home/ruser/.opencpu.conf
OpenCPU started.
[httpuv] http://myserver/rstudio/p/1529/ocpu
Error : .onAttach failed in attachNamespace() for 'opencpu', details:
call: rhttpd$init()
error: could not find function "startDynamicHelp"
Error: package or namespace load failed for ‘opencpu’
这是我得到错误的地方。尝试谷歌搜索错误但没有运气。
【问题讨论】:
-
您正在混淆云服务器和单用户服务器。您不需要手动启动 R。尝试在浏览器中打开
http://yourhostname。