如何在 VirtualBox 虚拟机上的 Solaris 上安装 R? [英] How to install R on Solaris on a VirtualBox virtual machine?

查看:29
本文介绍了如何在 VirtualBox 虚拟机上的 Solaris 上安装 R?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问答是对此评论的回复.评论中问题的答案并非微不足道,评论太大,不适合作为该线程中问题的答案(回答我自己的问题是官方鼓励).如果你有更好的答案,请留言!

This Q&A is a response to this comment. The answer to the question in the comment is not trivial, is too big for a comment, and not suitable as an answer to the question in that thread (answering my own question is officially encouraged). If you have a better answer please post it!

问题是:如何在 Solaris 上的 VirtualBox 虚拟机上安装 R?

The question is: How to install R on Solaris on a VirtualBox virtual machine?

推荐答案

首先下载并安装 Oracle VM VirtualBox.

然后下载并解压缩 Oracle Solaris 11.1 VirtualBox 模板.解压 Oracle 模板后,您应该会看到一个名为 OracleSolaris11_1.ova 的文件,您将在 VirtualBox 中打开该文件.

Then download and unzip the Oracle Solaris 11.1 VirtualBox Template. After you unzip the Oracle template you should see a file called OracleSolaris11_1.ova, that's what you'll open in VirtualBox.

启动VirtualBox,点击File,然后点击Import Appliance,然后导航到您刚刚提取的ova 文件.导入需要一些时间.

Start VirtualBox, click on File, then Import Appliance, then navigate to chose the ova file you just extracted. It will take some time to import.

单击 VirtualBox 上的 start 按钮启动 Solaris 虚拟机.启动需要一些时间,系统会提示您添加 root 密码、用户名和用户密码.然后您将使用这些详细信息登录,等待系统加载,选择 gnome 以确保您获得桌面环境,并选择您的时区、键盘布局和语言(我的似乎突出显示中文作为默认选择,所以注意不要太快点击那个).

Start the Solaris virtual machine by clicking on the start button on VirtualBox. It will take some time to start up and you'll be prompted to add a root password, user name and user password. You'll then use those details to log in, wait for the system to load, choose gnome to ensure you get a desktop environment, and choose your time zone, keyboard layout and language (mine seems to highlight Chinese as the default choice, so be careful not to click through that one too quickly).

最终你会得到一个桌面,右击桌面并点击open terminal,然后在终端输入(或粘贴):

Eventually you'll get a desktop, right-click on the desktop and click open terminal, then in the terminal type (or paste):

sudo wget https://oss.oracle.com/ORD/ord-3.0.1-sol10-x86-64-sunstudio12u3.tar.gz && sudo wget https://oss.oracle.com/ORD/ord-3.0.1-supporting-sol10-x86-64-sunstudio12u3.tar.gz

这将连接到互联网并下载您需要的两个文件.下一行将解压这两个档案:

That will connect to the internet and download two files you need. The next line will unpack those two archives:

sudo tar -xzvf ord-3.0.1-sol10-x86-64-sunstudio12u3.tar.gz && sudo tar -xzvf ord-3.0.1-supporting-sol10-x86-64-sunstudio12u3.tar.gz 

然后下一行安装 R,运行该行后注意提示:

And then this next line installs R, watch for the prompts after you run the line:

sudo bash install.sh 

终端中会闪过很多东西,以安装结束.成功了

A lot will flash by in the terminal, concluding with Installation of <ORD> was successful

接下来是我偏离说明的地方 这里 因为我不理解它们.您将从解压的存档中将所有以 lib 开头的文件移动到 R 需要它们的另一个目录中:

Now the next bit is where I deviate from the instructions here because I didn't understand them. You'll move all files beginning with lib from the archives that you unpacked into another directory where they are needed by R:

sudo mv lib* /usr/lib/64/R/lib/

这将不会在终端中返回任何内容.然后我们可以像这样简单地在终端中输入R来运行

That will return nothing in the terminal. Then we can run R simply by typing in the terminal like so

R

现在您应该在终端中运行一个常规的 R 会话.

And now you should have a regular R session running in the terminal.

这篇关于如何在 VirtualBox 虚拟机上的 Solaris 上安装 R?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆