gpt4 book ai didi

linux - 在 Ubuntu 上本地安装 nloptr 时遇到问题

转载 作者:太空狗 更新时间:2023-10-29 11:13:35 26 4
gpt4 key购买 nike

我目前正在使用开源(R 和 ubuntu)为我的组织工作。问题是我们不能使用互联网,这意味着如果我想安装一些软件包或软件,我必须从其他电脑下载它并将它传输到工作电脑。正如您现在可能知道的那样,我在使用 R3.1.3 的 Ubuntu 12.04 上安装 nloptr 包时遇到了问题。

尝试 1

我已将“nlopt-2.4.2.tar.gz”放在“home”文件夹中。我这样做的原因是因为“配置”源代码显示它在 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_URL 修复为 NLOPT_URL = "file:///home//usr//${NLOPT_TGZ}现在它就像一个魅力!感谢您的帮助。

关于linux - 在 Ubuntu 上本地安装 nloptr 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29296435/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com