安装最新版本的RStudio
我想安装最新的RStudio。 我按照你如何在Ubuntu 14.04 LTS中安装R 3.2.2的回答?
当我输入答案的最后一行时
make && make install
我收到错误信息:
*** No targets specified and no makefile found stop.
安装R.
最新版本的R是3.5,但也可以使用3.4版本。 根据您使用的Ubuntu版本以及所需的R版本,执行以下操作之一。
-
R 3.5与Ubuntu 14.04 Trusty Tahr,16.04 Xenial Xerus,18.04 Bionic Beaver
对于最新的R 3.5软件包,添加R存储库和密钥。 有关更多信息,请参阅Ubuntu的Comprehensive R Archive Network 。
echo "deb http://cran.stat.ucla.edu/bin/linux/ubuntu `lsb_release -sc`-cran35/" | sudo tee --append /etc/apt/sources.list.d/cran.list sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 sudo apt update sudo apt install r-base
(如果http://cran.stat.ucla.edu/bin/linux/ubuntu不起作用,或者您希望镜像离您更近,请将
cran.stat.ucla.edu
替换为CRAN Mirrors中列出的其中一个URL) 。 -
R 3.4与Ubuntu 14.04 Trusty Tahr,16.04 Xenial Xerus,17.10 Artful Aardvark,18.04 Bionic Beaver
对于最新的R 3.4软件包,添加R存储库和密钥。 有关更多信息,请参阅Ubuntu的Comprehensive R Archive Network 。
echo "deb http://cran.stat.ucla.edu/bin/linux/ubuntu `lsb_release -sc`/" | sudo tee --append /etc/apt/sources.list.d/cran.list sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 sudo apt update sudo apt install r-base
(如果http://cran.stat.ucla.edu/bin/linux/ubuntu不起作用,或者您希望镜像离您更近,请将
cran.stat.ucla.edu
替换为CRAN Mirrors中列出的其中一个URL) 。 -
宇宙存储库
有时R可能无法从您的Ubuntu版本的Comprehensive R Archive Network获得(这通常发生在刚刚发布新版本的Ubuntu时),或者您可能只想安装专门为Ubuntu打包的R版本。 在这种情况下,可以从Universe存储库安装
r-base
。确保在“ 软件和更新”工具中选择“社区维护的免费和开源软件(Universe)”。 然后执行以下操作。
sudo apt update sudo apt install r-base
准备安装R Studio
R Studio需要JPEG运行时库,因此请安装它。
sudo apt install libjpeg62
在Ubuntu 17.10之前,R Studio需要GStreamer库,因此请执行以下操作之一,具体取决于您使用的是哪个版本的Ubuntu。
-
Ubuntu 12.04到16.04
sudo apt install libgstreamer-plugins-base0.10-0 libgstreamer0.10-0
-
Ubuntu 16.10到17.04(32位)
wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_i386.deb wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_i386.deb sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_i386.deb sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_i386.deb sudo apt-mark hold libgstreamer-plugins-base0.10-0 sudo apt-mark hold libgstreamer0.10
-
Ubuntu 16.10到17.04(64位)
wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.deb wget --tries=3 --timeout=120 http://ftp.ca.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb sudo apt-mark hold libgstreamer-plugins-base0.10-0 sudo apt-mark hold libgstreamer0.10
(有关更多信息,请参阅https://mikewilliamson.wordpress.com/2016/11/14/installing-r-studio-on-ubuntu-16-10/ )。
-
Ubuntu 17.10及更高版本
不需要额外的包。
安装R Studio
下载R Studio的二进制版本并安装。
请务必在wget
命令中使用最新版本。 您可以通过右键单击R Studio下载页面底部附近的Ubuntu Debian安装程序来获取最新版本的URL。
-
Ubuntu 12.04到15.10(32位)
wget --tries=3 --timeout=120 https://download1.rstudio.org/rstudio-1.1.383-i386.deb sudo dpkg -i rstudio-*-i386.deb
-
Ubuntu 12.04到15.10(64位)
wget --tries=3 --timeout=120 https://download1.rstudio.org/rstudio-1.1.383-amd64.deb sudo dpkg -i rstudio-*-amd64.deb
-
Ubuntu 16.04到17.10及更高版本(仅限64位)
wget --tries=3 --timeout=120 https://download1.rstudio.org/rstudio-xenial-1.1.383-amd64.deb sudo dpkg -i rstudio-*-amd64.deb
可选的
在Ubuntu 17.10之前,如果要在Unity Dash中的“Education”类别中显示R或R Studio,而不是“Development”类别,请分别执行以下操作。
sudo sed -i "s|Graphics;|Education;|g" /usr/share/applications/R.desktop sudo sed -i "s|Development;|Education;Math;|g" /usr/share/applications/rstudio.desktop
最简单的方法是下载Anaconda,它既快速又简单,如果你也使用Python,还可以使用其他工具,如Jupyter和Spyder。 Anaconda可以从https://docs.continuum.io/anaconda/install-linux.html下载。 安装Anaconda后,输入
anaconda-navigator
进入您的终端,导航器将弹出。 你会看到rstudio准备安装。 按安装,它的工作原理。
另一方面,不要打扰网站上的Debian(.deb文件),你将浪费你的时间与错误代码。
可能的(不同的)问题:
运行make后遇到的问题可能已经发生在早期(当配置脚本因为遇到问题而退出时,不会创建makefile)。
调试:
您应该能够通过读取该脚本的输出来validation这一点。
解决运行’./config’命令后看到的错误,可能会帮助您进一步安装源代码。
复制:
我试图复制你的错误,在我的系统上我得到了错误:
“configure:error: – with-x = yes(default),X11 headers / libs不可用”
如果我使用选项’–with-x = no’运行脚本,则configure脚本完成且没有错误,并生成makefile。
解:
错误的原因是您有X11但没有开发文件。 手动安装开发文件后,您可以继续安装Rstudio。
sudo apt-get install libx11-dev libxt-dev
链接:
通过http://r.789695.n4.nabble.com/A-problem-with-X11-quot-headers-libs-quot-td4655213.html找到解决方案