[問題] 已解決rstudio server安裝套件狀況

看板R_Language作者 (征服的怒火)時間8年前 (2015/10/02 18:06), 8年前編輯推噓0(008)
留言8則, 2人參與, 最新討論串1/1
[問題類型]: rstudio server安裝套件包出現狀況 [軟體熟悉度]: 入門(寫過其他程式,只是對語法不熟悉) [問題敘述]: 在rstudio的console中輸入 > options(repos = "http://taiwanrusergroup.github.io/R") > local({ + install.packages('DSC2015R') + pkgs.remote <- available.packages() + pkgs.local <- installed.packages() + pkgs <- intersect(rownames(pkgs.remote), rownames(pkgs.local)) + pkgs.outdated <- package_version(pkgs.local[pkgs, "Version"]) != package_version(pkgs.remote[pkgs, "Version"]) + if (sum(pkgs.outdated) > 0) install.packages(names(which(pkgs.outdated))) + }) 回應為 Installing package into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) Warning in install.packages : 'lib = "/usr/local/lib/R/site-library"' is not writable Would you like to use a personal library instead? (y/n) 輸入y 會裝到home/R/x86_64-pc-linux-gnu-library/3.2/ 輸入 library(DSC2015R) 回應 Error in library(DSC2015R) : there is no package called ‘DSC2015R’ -------------------- 找到處理寫入site-library的碼 # edd 03 Apr 2003 cf Section 10.1.2 of Debian Policy if [ ! -e /usr/local/lib/R ]; then if mkdir /usr/local/lib/R 2>/dev/null; then chown root:staff /usr/local/lib/R chmod 2775 /usr/local/lib/R fi fi if [ ! -e /usr/local/lib/R/site-library ]; then if mkdir /usr/local/lib/R/site-library 2>/dev/null; then chown root:staff /usr/local/lib/R/site-library chmod 2775 /usr/local/lib/R/site-library fi fi 懷疑: 我直接使用ubuntu帳號登入rs,而沒有新增一個可以使用的group到.conf裡面 [環境敘述]: R version 3.2.2 (2015-08-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.3 LTS locale: [1] LC_CTYPE=zh_TW.UTF-8 LC_NUMERIC=C LC_TIME=zh_TW.UTF-8 LC_COLLATE=zh_TW.UTF-8 [5] LC_MONETARY=zh_TW.UTF-8 LC_MESSAGES=zh_TW.UTF-8 LC_PAPER=zh_TW.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=zh_TW.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_3.2.2 ---------------- /etc/rstudio/rserver.conf rsession-ld-library-path=/usr/local/lib/R ---------------- /etc/rstudio/rsession.conf session-timeout-minutes=30 r-cran-repos=http://ftp.yzu.edu.tw/CRAN/ r-libs-user=~/R/packages [關鍵字]: rstudio server,套件安裝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.136.47.173 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1443780363.A.BAE.html

10/02 18:10, , 1F
猜測是用網頁登入權限不足,可能用sudo R安裝可以!?
10/02 18:10, 1F

10/02 18:16, , 2F
回正題,按Y後建立私人目錄,下載成功,但是library套件
10/02 18:16, 2F

10/02 18:17, , 3F
回應Error in library(DSC2015R) : there is no package c
10/02 18:17, 3F

10/02 21:20, , 4F
要麻煩你補一下error message的後面喔(才是重點...)
10/02 21:20, 4F
※ 編輯: kpwada (114.35.127.191), 10/03/2015 02:04:13

10/03 02:04, , 5F
已補上
10/03 02:04, 5F
※ 編輯: kpwada (114.35.127.191), 10/03/2015 02:25:26

10/03 11:19, , 6F
如果直接再裝一次,會卡住嗎?
10/03 11:19, 6F
我新增了一個新使用者,並且在conf中加入其group的限制後 不會再出現lib無法寫入的回應 但在是install DSC2015R的過程中 RS網頁變慢,整個FIREFOX都無法動作,甚至出現JAVA指令停止的警告 強制關閉FIREFOX,等了快一小時,看TOP的CPU正常後再登入RS library(DSC2015R)就正常囉~~ ※ 編輯: kpwada (114.35.127.191), 10/03/2015 11:28:10

10/03 17:47, , 7F
了解,謝謝你的回報
10/03 17:47, 7F

10/04 19:28, , 8F
不客氣 看了你很多好文章 這是我應該做的事
10/04 19:28, 8F
文章代碼(AID): #1M3bSBkk (R_Language)