[英]Error while installing “nloptr_1.0.4.tar.gz” from local
When i tried to install nloptr_1.0.4.tar.gz from local, It needed another unix library
nlopt-2.4.2.tar.gz which I got it resolved from the following thread Error while installing a tar.gz package in R
当我尝试从本地安装nloptr_1.0.4.tar.gz时,它需要另一个unix库
nlopt-2.4.2.tar.gz ,我将其从以下线程中解决了: 在R中安装tar.gz软件包时出错
But, even after that the package is not getting installed 但是,即使之后仍未安装该软件包
It throws the following error, 它引发以下错误,
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/cloudera/R/x86_64-redhat-linux-gnu-library/3.2/nloptr/libs/nloptr.so':
/home/cloudera/R/x86_64-redhat-linux-gnu-library/3.2/nloptr/libs/nloptr.so: undefined symbol: nlopt_set_maxtime
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/cloudera/R/x86_64-redhat-linux-gnu-library/3.2/nloptr’
For the above error, I got a lead from the following link: 对于上述错误,我从以下链接获得了线索:
https://cran.r-project.org/web/packages/ROracle/INSTALL and https://cran.r-project.org/web/packages/ROracle/INSTALL和
http://ab-initio.mit.edu/wiki/index.php/NLopt_Installation http://ab-initio.mit.edu/wiki/index.php/NLopt_Installation
Based on the above links, I had to set LD_LIBRARY_PATH variable to /usr/local/lib and /usr/local/include
基于以上链接,我不得不将LD_LIBRARY_PATH变量设置为/ usr / local / lib和/ usr / local / include
Even after setting the above Environment variable, R CMD INSTALL nloptr_1.0.4.tar.gz is not getting installed and throwing the same error.
即使设置了上面的环境变量, R CMD INSTALL nloptr_1.0.4.tar.gz也没有安装并抛出相同的错误。
The fix is easy. 修复很容易。 On a Debian/Ubuntu system do
在Debian / Ubuntu系统上
sudo apt-get install libnlopt-dev
as you always need the development package to compile a given library. 因为您始终需要开发包来编译给定的库。 It will then be found, and
nloptr
will install without a hitch. 然后将找到它,并且
nloptr
将顺利安装。
Similarly on a RH/FC/CentOS with rpms. 同样在RH / FC / CentOS上,转速为rpm。
Now, when I helped Jelmer rewrite the configuration for nloptr, we did make sure it worked both ways: with an install nlopt library, and without. 现在,当我帮助Jelmer改写配置nloptr,我们并确保它的工作是双向的: 与安装nlopt库,没有。 You seem to stuck in the middle with one that is installed, but different ("missing symbol").
您似乎陷入了一个已安装但又有所不同的中间位置(“缺少符号”)。 If you cannot uninstall that 'wrong' libnlopt, I would recommend altering the nloptr sources to not check for it but rather always build itself against a copy of nlopt 2.4.2 which it will download and compile statically.
如果您不能卸载该“错误的” libnlopt,我建议您更改nloptr源,以不进行检查,而是始终根据nlopt 2.4.2的副本进行构建,该副本将静态下载并编译。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.