我的计算机 (Linux) 上安装了 R 3.4.1.1。
我想安装 R 版本 2.14.1,因为 Rmosek 包在新版本中不起作用。
我已经从 Cran 下载了 R-2.14.2.tar.gz。
我的问题是我不明白安装说明,
它说解压 R 源并转到顶层目录并发出以下命令:
./configure
make
我在终端中写了以下内容:
tar -zxvf R-2.14.2.tar.gz
cd Downloads
cd R-2.14.2
./configure
它运行但最后给出错误:
configure: error: --with-x=yes (default) and X11 headers/libs are not available
make
它给出了错误:
make: *** No targets specified and no makefile found. Stop.
该文件说明如果我的 make 不叫 `make',请将环境变量 MAKE 设置为 它的名称,并在这些说明中通篇使用该名称。我真的不知道我应该怎么做,因为我是 Linux 新手。
还有其他说明更详细的说明吗?非常感谢您的帮助或指导。
问候,
志摩。
最佳答案
这在 R 安装和管理指南中有详细的回答, http://cran.r-project.org/doc/manuals/R-admin.html#Essential-programs-and-libraries
Unless you do not want to view graphs on-screen (or use a Mac) you need ‘X11’ installed, including its headers and client libraries. For recent Fedora distributions it means (at least) RPMs ‘libX11’, ‘libX11-devel’, ‘libXt’ and ‘libXt-devel’. On Debian we recommend the meta-package ‘xorg-dev’. If you really do not want these you will need to explicitly configure R without X11, using --with-x=no.
更具体地说,对于 Ubuntu,这意味着:
sudo apt-get install xorg-dev
然后继续编译安装R。
关于linux - 在 ubuntu 上安装以前版本的 R 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20752307/