Rstudio 无法在 Ubuntu 21.04 中启动

Rstudio 无法在 Ubuntu 21.04 中启动

我已经安装了 R 4

$ R

R version 4.1.1 (2021-08-10) -- "Kick Things"

然后从 Rstudio安装程序。软件中心显示安装正确,应用程序栏上有图标,但是,当我单击它时,它不会启动。从终端我得到:

$ rstudio
WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
Aborted (core dumped)

可能是什么问题呢?

谢谢

PS:视频特点是:

$ lspci -k | egrep -A3 "VGA|3D|Video"
08:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 730] (rev a1)
    Subsystem: Gigabyte Technology Co., Ltd GK208B [GeForce GT 730]
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
$ lsmod | grep drm
nvidia_drm             57344  5
nvidia_modeset       1228800  7 nvidia_drm
drm_kms_helper        245760  1 nvidia_drm
cec                    53248  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
drm                   552960  8 drm_kms_helper,nvidia_drm

通过运行建议的命令我得到:

$ wget -c https://rstudio.org/download/latest/stable/desktop/bionic/rstudio-latest-amd64.deb && sudo apt-get install ./rstudio-latest-amd64.deb
--2021-09-19 12:05:03--  https://rstudio.org/download/latest/stable/desktop/bionic/rstudio-latest-amd64.deb
Resolving rstudio.org (rstudio.org)... 45.33.2.142
Connecting to rstudio.org (rstudio.org)|45.33.2.142|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://s3.amazonaws.com/rstudio-desktop/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb [following]
--2021-09-19 12:05:04--  https://s3.amazonaws.com/rstudio-desktop/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb
Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.217.82.238
Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.217.82.238|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 122505496 (117M) [application/x-deb]
Saving to: ‘rstudio-latest-amd64.deb’

rstudio-latest-amd6 100%[===================>] 116,83M  11,9MB/s    in 12s     

2021-09-19 12:05:16 (9,61 MB/s) - ‘rstudio-latest-amd64.deb’ saved [122505496/122505496]

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'rstudio' instead of './rstudio-latest-amd64.deb'
The following package was automatically installed and is no longer required:
  libllvm11
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  rstudio
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
After this operation, 831 MB of additional disk space will be used.
Get:1 /home/gigiux/rstudio-latest-amd64.deb rstudio amd64 1.4.1717 [123 MB]
Selecting previously unselected package rstudio.
(Reading database ... 197622 files and directories currently installed.)
Preparing to unpack .../rstudio-latest-amd64.deb ...
Unpacking rstudio (1.4.1717) ...
Setting up rstudio (1.4.1717) ...
Processing triggers for mailcap (3.68ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for shared-mime-info (2.0-1) ...
W: Repository is broken: rstudio:amd64 (= 1.4.1717) has no Size information
N: Download is performed unsandboxed as root as file '/home/gigiux/rstudio-latest-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

答案1

使用以下命令重新安装最新的 RStudio:

cd ~/Downloads
wget -c https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb
sudo apt-get install ./rstudio-1.4.1717-amd64.deb

答案2

尝试运行rstudio --no-sandbox

相关内容