trouble with Installing nloptr by locally on Ubuntu

落爺英雄遲暮 提交于 2019-12-21 21:20:16

问题


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.

Attempt 1

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. 

Attempt 2

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.


回答1:


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.



来源:https://stackoverflow.com/questions/29296435/trouble-with-installing-nloptr-by-locally-on-ubuntu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!