Debian系统Shiny server中文显示和服务自启动设置

来源:互联网 发布:淘宝u站9.9包邮 编辑:程序博客网 时间:2024/06/02 01:26

Shiny从0.10升级到0.10.1或0.10.2后Shiny server无法正确显示APP中的中文,提示某某行unexpected INCOMPLETE_STRING,但在RStudio中运行APP则完全正常,判断为shiny server编码处理有问题。

解决办法:在 /etc/init.d/shiny-server 文件中添加一行:

LANG=zh_CN.UTF-8 export LANG


之前的安装步骤为:

1. 通过源代码编译安装shiny-server

2. 拷贝代码目录中config/default.config 到 /etc/shiniy-server/ 并重命名为 shiny-server.conf

3. 拷贝代码目录中config/init.d/debian/shiny-server 文件到 /etc/init.d/ 目录下


若服务仍不能在开机时自启动,修改/etc/init.d/shiny-server 文件,将:

 DAEMON=shiny-server

改为:

DAEMON="/usr/bin/shiny-server"

1 0