englianhu@Scibrokes-Trading:~$ sudo gdebi rstudio-1.4.1106-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
RStudio
RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.
Do you want to install the software package? [y/N]:Y
/usr/bin/gdebi:113: FutureWarning: Possible nested set at position 1
c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
Selecting previously unselected package rstudio.
(Reading database ... 566539 files and directories currently installed.)
Preparing to unpack rstudio-1.4.1106-amd64.deb ...
Unpacking rstudio (1.4.1106) ...
dpkg: dependency problems prevent configuration of rstudio:
rstudio depends on libclang-dev; however:
Package libclang-dev is not installed.
dpkg: error processing package rstudio (--install):
dependency problems - leaving unconfigured
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.24-1ubuntu4) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (2.0-1) ...
Errors were encountered while processing:
rstudio
进而
englianhu@Scibrokes-Trading:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
libclang1-11 libobjc-10-dev libpq5
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
rstudio
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 828 MB disk space will be freed.
Do you want to continue? [Y/n]
答案1
当时使用Ubuntu 18.04LTS
KDE plasma(可能有兼容性问题),但现在使用Kubuntu 20.04LST
,安装了...
# update indices
apt update -qq
# install two helper packages we need
apt install --no-install-recommends software-properties-common dirmngr
# import the signing key (by Michael Rutter) for these repo
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
# add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
来源 :https://cloud.r-project.org/
:~$ wget https://s3.amazonaws.com/rstudio-ide-build/desktop/bionic/amd64/rstudio-1.4.1717-amd64.deb
:~$ sudo dpkg -i rstudio-1.4.1717-amd64.deb
答案2
首先,我建议安装系统的所有更新,删除标记为自动删除的软件包,使用
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoremove --purge
然后通过以下方式安装 R 包
sudo apt-get install --reinstall r-base-dev
然后你应该知道 RStudio 为支持的 Ubuntu 18.04 LTS (Bionic Beaver) 提供了正确构建的 deb 包,你可以使用以下命令安装它
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