duncantl / CGIwithR

CGIwithR package allowing R scripts to run as CGI scripts on Apache Web servers
4 stars 1 forks source link

package version not yet update #1

Open englianhu opened 2 years ago

englianhu commented 2 years ago

Hi prof,

> install.packages('CGIwithR')
Warning message:
package ‘CGIwithR’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
> 
> devtools::session_info()$platform
 setting  value                       
 version  R version 4.1.2 (2021-11-01)
 os       Ubuntu 20.04.3 LTS          
 system   x86_64, linux-gnu           
 ui       X11                         
 language en                          
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Asia/Tokyo                  
 date     2021-12-16
englianhu commented 2 years ago

Installation of CGIwithR on 🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11)

$ neofetch
        #####           englianhu@Scibrokes 
       #######          ------------------- 
       ##O#O##          OS: RedFlag Desktop 11.0 x86_64 
       #######          Host: 23-p080d 
     ###########        Kernel: 5.10.0-1-amd64 
    #############       Uptime: 6 days, 2 hours, 58 mins 
   ###############      Packages: 6952 (dpkg), 3 (snap) 
   ################     Shell: bash 5.0.3 
  #################     Resolution: 1920x1080 
#####################   DE: KDE 
#####################   WM: KWin 
  #################     Theme: RedFlag Dark [KDE], Breeze [GTK3] 
                        Icons: RedFlag-ND-72th-Anniversary [KDE], breeze  
                        Terminal: konsole 
                        CPU: Intel i5-4590T (4) @ 3.000GHz 
                        GPU: NVIDIA GeForce 710M 
                        GPU: Intel HD Graphics 
                        Memory: 10552MiB / 15901MiB 

$ sudo su - -c "R -e \"devtools::install_github('duncantl/CGIwithR', force=TRUE)\""  

R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R是自由软件,不带任何担保。
在某些条件下你可以将其自由散布。
用'license()'或'licence()'来看散布的详细条件。

R是个合作计划,有许多人为之做出了贡献.
用'contributors()'来看合作者的详细情况
用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。

用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或
用'help.start()'通过HTML浏览器来看帮助文件。
用'q()'退出R.

> devtools::install_github('duncantl/CGIwithR', force=TRUE)
Downloading GitHub repo duncantl/CGIwithR@HEAD
   checking for file ‘/tmp/RtmpRL9PbM/remotes4abf5c21cbf6/duncantl-CGIwith✔  checking for file ‘/tmp/RtmpRL9PbM/remotes4abf5c21cbf6/duncantl-CGIwithR-e1afc34/DESCRIPTION’
─  preparing ‘CGIwithR’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘CGIwithR_0.74-0.tar.gz’

将程序包安装入‘/usr/lib/R/library’
(因为‘lib’没有被指定)
* installing *source* package ‘CGIwithR’ ...
** using staged installation
configure: creating ./config.status
config.status: creating R/CGIwithR.R

      *****************************************

  After the installation of this R package is complete
  copy the files R.cgi and .Rprofile in
      /usr/lib/R/library/00LOCK-CGIwithR/00new/CGIwithR/cgi-bin/
  to the cgi-bin area of your Web server. If necessary, 
  modify the settings in the first part of R.cgi to 
  suit your local configuration.

      *****************************************

** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (CGIwithR)

Installed but no response when read from library...

$ sudo su - -c "R -e \"require('CGIwithR')\""
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R是自由软件,不带任何担保。
在某些条件下你可以将其自由散布。
用'license()'或'licence()'来看散布的详细条件。

R是个合作计划,有许多人为之做出了贡献.
用'contributors()'来看合作者的详细情况
用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。

用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或
用'help.start()'通过HTML浏览器来看帮助文件。
用'q()'退出R.

> require('CGIwithR')
载入需要的程辑包:CGIwithR
duncantl commented 2 years ago

Hi CGIwithR is not generally used in interactive settings. If you want to explore it interactively, set any environment variable named WWW_...., e.g.

export WWW_bob=1` 

or

Sys.setenv("WWW_jane" = 1)

Then when you load the package, it won't wait to parse content from standard input, which is what it is appropriate when CGIwithR is used in an R script that is called by the Web server.