我目前使用开源(R和Ubuntu)为我的组织工作。 问题是,我们不能使用互联网,这意味着如果我想安装一些软件包或软件,我必须从其他PC下载并将其传输到工作PC。 正如你现在可能知道的,我在使用R3.1.3在Ubuntu 12.04上安装nloptr软件包时遇到了麻烦。
尝试1
我在'home'文件夹中放置了'nlopt-2.4.2.tar.gz'。 我这样做的原因是因为'configure'源代码显示它在R中使用download.file函数并从那里安装它。 但是由于我无法使用互联网,我在默认目录(打开terminal的目录)find'nlopt-2.4.2.tar.gz'。但是,我有一个错误说
trying URL 'http://ab-initio.mit.edu/nlopt-2.4.2.tar.gz' Error in download.file(url = "http://ab-initio.mit.edu/nlopt-2.4.2.tar.gz") ... (Omit) ... Execution halted /bin/tar: This does not look like a tar archive gzip: stdin: unexpected end of file ... (Omit) ... ./configure: line 3325: cd: nlopt-2.4.2: No such file or directory.
尝试2
看来我可以通过使用“sudo make install”来安装'nlopt'。 但是,再次,似乎我必须手动更改一些configuration设置。 问题是,我真的不知道安装后必须更改什么样的configuration,以便' nloptr
'可以成功安装。 我得到的错误信息是
'relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object;'
如果你能分享你的想法或想法,那将是非常棒的。
我通过修改configure和configure.ac来解决这个问题。 我所做的只是修复原来的NLOPT_URL
到NLOPT_URL = "file:///home//usr//${NLOPT_TGZ}
现在它就像一个魅力!感谢您的帮助。