本家様 https://posit.co/ 昔はhttps://rstudio.com/だったのだが、変わったみたい

Rの被せものなRStudio Desktop よくrstudio とのみいいますが、正式にはRStudio Desktopみたい

Rを使うならRStudio Desktop経由で使った方が断然楽

ってまずはその「R」のインストールが必要でそれは R参照で

RStudio Desktopのインストール(その1)

自身のホームディレクトリにインストールして使うなら「Zip/Tarballs」版を入手します

https://posit.co/download/rstudio-desktop/から「Zip/Tarballs」欄に移って
ubuntu18.04LTS、ubutu20.04LTSは「Ubuntu 18+/Debian 10+」の「RSTUDIO-2022.07.2-576-AMD64-DEBIAN.TAR.GZ」をクリック
RHEL7系(CentOS7)やRHEL8系(RockyLinuxら)は「Fedora 19/Red Hat 7」の「RSTUDIO-2022.07.2-576-X86_64-FEDORA.TAR.GZ」をクリックしてインストールバイナリを入手します

インストール先がubuntu20.04なので「rstudio-2022.07.2-576-amd64-debian.tar.gz」(184MB)を取得

saber@ubuntu:~$ cat /etc/os-release |grep VERSION=
VERSION="20.04.5 LTS (Focal Fossa)"
 
saber@ubuntu:~$ wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.07.2-576-amd64-debian.tar.gz
 
(インストール先は$HOME/appsの中)
saber@ubuntu:~$ mkdir apps
saber@ubuntu:~$ tar -xf rstudio-2022.07.2-576-amd64-debian.tar.gz -C ./apps
 
(パス設定)
saber@ubuntu:~$ export PATH=$HOME/apps/rstudio-2022.07.2+576/bin:$PATH

っで実行してみる

saber@ubuntu:~$ module load R
saber@ubuntu:~$ which R
/apps/R-4.2.2/bin/R
 
saber@ubuntu:~$ rstudio

暫くすると画面が表示されます
2022y12m03d_221848695.png

RStudio Desktopのインストール(その2)

ユーザ自身がRStudioをダウンロードして利用されるのもいいのですが、10人、20人とダウンロードされるとストレージも肥大します
共有の場所に置くものありかなと思います

なら提供されているrpmファイルで入れてしまうのも手なのですが、RStudioのバージョンが選べない.
RStudioが最新になってrpmでインストールすると前のバージョンが消えてしまう.
新しいバージョンは前のバージョンの上位互換がなされていると思うので、どんどん更新しても宜しいと思いますが、インターフェイスが前の方がいいとかで残した方がいいときもある.

なのでrpmではいれず、tar.gzを使って /apps にいれます

root@ubuntu:~# wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.07.2-576-amd64-debian.tar.gz
 
root@ubuntu:~# mkdir /apps
 
root@ubuntu:~# tar -xf rstudio-2022.07.2-576-amd64-debian.tar.gz -C /apps

あとはEnvironmentModulesを設定します

root@ubuntu:~# mkdir /apps/modulefiles/RStudio
root@ubuntu:~# vi /apps/modulefiles/RStudio/2022.07.2-576
#%Module1.0
#module load R
set          RS   /apps/rstudio-2022.07.2+576
prepend-path PATH $RS/bin
root@ubuntu:~#
root@ubuntu:~#
 
(RStudio既定のバージョンを指定)
root@ubuntu:~# vi /apps/modulefiles/RStudio/.version
#%Module1.0
set ModulesVersion 2022.07.2-576
 
root@ubuntu:~#

使う際はまずRを呼び出して、RStudioも読み込む. EnvironmentModulesのRStudio内に「module load R」とか書けばいいのでしょうが、、お好みで.

メモ

RStudioDesktopを実行したら下記のようねメッセージが表示される. 恐らくSSHらでリモートマシンにログインされてRStudioを起動されたと思います
X11を通すためにも「ssh <マシン名> -X」とかいれてリモートアクセスすれば解消されるかと 「ssh <マシン名> -XY」でもいいのかも

saber@ubuntu:~$ rstudio
(略
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
 
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
 
Aborted (core dumped)
saber@ubuntu:~$

RStudioDesktopを実行して画面は表示されるが、何も映っていない.
その際は「~/.config/RStudio/desktop.ini」に下記を加える. 「~/.config/RStudio/desktop.ini」は「RStudio Desktop」(rstudio)を起動したときに作られる

[General]
cookies=@Invalid()
desktop.renderingEngine=software

*multi-user.targetではだめみたい. graphical.target で稼働が必要みたい

めも

https://github.com/rstudio/rstudio/issues/13959

(GL関係のエラーメッセージが表示されたら下記で実行します)
rstudio --use-gl=angle
最新の60件
2025-02-17 2025-02-15 2025-02-14 2025-02-12 2025-02-03 2025-02-02 2025-02-01 2025-01-27 2025-01-26 2025-01-25 2025-01-24 2025-01-23 2025-01-20 2025-01-13 2025-01-12 2025-01-08 2024-12-30 2024-12-29 2024-12-22 2024-12-20 2024-12-17 2024-12-15 2024-12-14 2024-12-12 2024-12-11 2024-12-10
  • R/RStudio
2024-12-09 2024-12-08 2024-11-28 2024-11-22 2024-11-15 2024-11-14 2024-11-12 2024-11-06 2024-11-05 2024-11-04 2024-11-02 2024-11-01 2024-10-28 2024-10-27 2024-10-23 2024-10-18 2024-10-17 2024-10-15 2024-10-14

edit


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2024-12-10 (火) 01:34:04