无法使用rapache运行r脚本

无法使用rapache运行r脚本,r,apache,rapache,R,Apache,Rapache,我已使用以下代码安装Rapache: apt-get install r-base-dev apache2-mpm-prefork apache2-prefork-dev wget http://www.rapache.net/rapache-1.2.3.tar.gz tar xzvf rapache-1.2.3.tar.gz cd rapache-1.2.3 ./configure make make install <% print(rnorm(100)) %> 然

我已使用以下代码安装Rapache:

apt-get install r-base-dev apache2-mpm-prefork apache2-prefork-dev
wget http://www.rapache.net/rapache-1.2.3.tar.gz 
tar xzvf rapache-1.2.3.tar.gz
cd rapache-1.2.3
./configure 
make
make install   
<%
print(rnorm(100))
%>
然后在/var/www/html文件夹中,我添加了一个名为test.r文件的r脚本,代码如下:

apt-get install r-base-dev apache2-mpm-prefork apache2-prefork-dev
wget http://www.rapache.net/rapache-1.2.3.tar.gz 
tar xzvf rapache-1.2.3.tar.gz
cd rapache-1.2.3
./configure 
make
make install   
<%
print(rnorm(100))
%>

是否有我遗漏的内容?

通过以下步骤解决该问题:1)安装brew R软件包。2) 将“位置”更改为“目录”3)将“SetHandler r-handler”更改为“SetHandler r-script”4)将“RFileHandler”行更改为“RHandler brew::brew”5)重新启动Apache