簡體   English   中英

在Ubuntu上本地安裝nloptr的麻煩

[英]trouble with Installing nloptr by locally on Ubuntu

我目前正在使用開源(R和ubuntu)為我的組織工作。 問題是我們不能使用互聯網,這意味着如果我想安裝一些軟件包或軟件,我必須從其他電腦下載它並將其傳輸到工作PC。 您現在可能知道,我在使用R3.1.3在Ubuntu 12.04上安裝nloptr軟件包時遇到問題。

嘗試1

我在'home'文件夾中放了'nlopt-2.4.2.tar.gz'。 我這樣做的原因是因為'configure'源代碼顯示它在R中使用download.file函數並從那里安裝它。 但由於我無法使用互聯網,我在默認目錄(我打開終端的目錄)上找到'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'。 但是,再次,似乎我必須手動更改一些配置設置。 問題是我真的無法弄清楚安裝后我必須更改哪種配置,以便' nloptr '可以成功安裝。 我得到的錯誤信息是

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

如果你能分享你的想法或任何想法,那將是很棒的。

我通過修改configure和configure.ac來解決這個問題。 我所做的只是將原始NLOPT_URLNLOPT_URL = "file:///home//usr//${NLOPT_TGZ}現在它就像一個魅力!感謝您的幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM