在Ubuntu上本地安装nloptr的麻烦 [英] trouble with Installing nloptr by locally on Ubuntu

查看:752
本文介绍了在Ubuntu上本地安装nloptr的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用开源(R和ubuntu)为我的组织工作.问题是我们无法使用互联网,这意味着如果我要安装某些软件包或软件,则必须从其他PC下载并将其传输到正常工作的PC.如您现在所知,我在使用R3.1.3的Ubuntu 12.04上安装nloptr软件包时遇到了麻烦.

I'm currently using open source (R and ubuntu) to work for my organization. The problem is that we could NOT use internet which means if I want to install some package or software, I have to download it from other pc and transfer it to the working PC. As you might know by now, I'm having trouble with installing the nloptr package on Ubuntu 12.04 with R3.1.3.

尝试1

我已将'nlopt-2.4.2.tar.gz'放置在'home'文件夹中.我这样做的原因是因为配置"源代码表明它使用R中的download.file函数并从那里安装它.但是由于无法使用互联网,我在默认目录(打开终端的目录)上找到了"nlopt-2.4.2.tar.gz".但是,出现错误提示

I've placed 'nlopt-2.4.2.tar.gz' on 'home' folder. The reason why I did this is that because the 'configure' source code shows that it uses download.file function in R and install it from there. But since I'm not able to use internet, I located 'nlopt-2.4.2.tar.gz' on the default directory (the directory where I open up the terminal) However, I've got an error saying

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".但是,再次,看来我必须手动更改一些配置设置.问题是我真的不知道安装后必须更改哪种配置才能成功安装"nloptr".我收到的错误消息是

It seems I could just install 'nlopt' by using 'sudo make install'. But, again, it seems I have to manually change some configure settings. The problem is that I really can't figure out what kind of configure that I have to change after the installation so that 'nloptr' could install successfully. The error message that I've got was

'relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object;'

如果您能分享您的想法或任何想法,那将是很好的.

It would be great if you could share your thoughts or any ideas.

推荐答案

我通过修改configure和configure.ac解决了这个问题. 我所做的只是将原始的NLOPT_URL固定为NLOPT_URL = "file:///home//usr//${NLOPT_TGZ} 现在,它就像一种魅力! 感谢您的帮助.

I figured it out by modifying configure and configure.ac. All I did was fixing original NLOPT_URL to NLOPT_URL = "file:///home//usr//${NLOPT_TGZ} Now it works like a charm! Thanks for the help.

这篇关于在Ubuntu上本地安装nloptr的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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