在Linux上安装nloptr-致命错误:nlopt.h:没有这样的文件或目录

用户名

另一个在Linux(Ubuntu 14.04.4 LTS)上安装nloptr软件包的帮助问题我浏览了许多问题,但没有设法找到解决方案。

我无法在R(版本3.3.1 / Rstudio版本0.99.902)安装lme4封装的安装nloptr具有非零退出状态。当我尝试

    install.package("nloptr") 

我得到以下内容:

Installing package into ‘/home/rd14/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/nloptr_1.0.4.tar.gz'
Content type 'unknown' length 353942 bytes (345 KB)
==================================================
downloaded 345 KB

* installing *source* package ‘nloptr’ ...
** package ‘nloptr’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for pkg-config... yes
configure: Now testing for NLopt header file.
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking nlopt.h usability... no
checking nlopt.h presence... no
checking for nlopt.h... no
configure: Need to download and build NLopt
trying URL 'http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz'
Content type 'application/x-gzip' length 2361992 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

configure: Starting to install library to /tmp/Rtmp7A1ldT/R.INSTALL66fffc391ed/nloptr/nlopt-2.4.2
configure: Done installing library to /tmp/Rtmp7A1ldT/R.INSTALL66fffc391ed/nloptr/nlopt-2.4.2
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/usr/share/R/include -DNDEBUG      -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c dummy.cpp -o dummy.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG     -I/tmp/Rtmp7A1ldT/R.INSTALL66fffc391ed/nloptr/nlopt-2.4.2/include -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c nloptr.c -o nloptr.o
nloptr.c:42:19: fatal error: nlopt.h: No such file or directory
 #include "nlopt.h"
                   ^
compilation terminated.
make: *** [nloptr.o] Error 1
ERROR: compilation failed for package ‘nloptr’
* removing ‘/home/rd14/R/x86_64-pc-linux-gnu-library/3.3/nloptr’
Warning in install.packages :
  installation of package ‘nloptr’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmp4Y3TXJ/downloaded_packages’

您的帮助将不胜感激!谢谢你。

德克·埃德尔布特尔

当Jelmer和我建立此设置时,它就可以在我的Ubuntu机器上运行,并且可以继续进行-通过下载和构建nlopt,或通过系统库。

当您使用Ubuntu时,最简单的解决方法可能就是安装系统nlopt库,该nloptr软件包将检测并使用该系统也是

sudo apt-get install libnlopt-dev 

然后尝试再次安装nlopt。

同样的,你应该能够得到lme4r-cran-lme4来自中所描述的由迈克尔·拉特适当的PPA README对Ubuntu的CRAN。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

致命错误:Python.h:没有这样的文件或目录,python-Levenshtein安装

arm-linux-gnu-gcc致命错误:stdio.h:没有这样的文件或目录

致命错误:linux / delay.h:没有这样的文件或目录

gcc:致命错误:limits.h:macos上没有这样的文件或目录

v4l.c:52:28:致命错误:linux / videodev.h:没有这样的文件或目录

致命错误:linux/compiler-gcc6.h:没有这样的文件或目录#include gcc_header(__GNUC__) ^

致命错误:asm/atomic.h:debian10 操作系统上没有这样的文件或目录

在Ubuntu中安装OpenFlow错误:glibconfig.h:没有这样的文件或目录

错误编译:linux / module.h:没有这样的文件或目录

在Linux中没有这样的文件或目录错误

DD命令上没有这样的文件或目录错误

在linux build / temp.linux-x86_64-3.6 / _clips.c:523:19上安装clipspy:致命错误:clips.h:没有这样的文件或目录#include <clips.h>

Mac OS X上的NDK构建错误:“严重错误:stdint.h:没有这样的文件或目录”

Windows上会发生Linux问题吗?“严重错误:fftw3.h:没有这样的文件或目录”

如何在Ubuntu上解决“严重错误:linux / wakelock.h:没有这样的文件或目录”?

在Windows XP上安装ungit错误:C:/ Documents:没有这样的文件或目录

glib.h使错误。致命错误:glib.h:没有这样的文件或目录

致命错误:mpi.h:没有这样的文件或目录#include <mpi.h>

jinclude.h:20:55:致命错误:jconfig.h:没有这样的文件或目录

os_defines.h:致命错误:features.h没有这样的文件或目录

写入Docker容器上的文件会出现错误:没有这样的文件或目录

致命错误:文件系统:没有这样的文件或目录

C++ 错误消息:致命错误:wchar.h:没有这样的文件或目录

错误生成:致命错误:pcre.h:没有这样的文件或目录

在Alpine Linux上安装Pillow时,没有这样的文件或目录“ limits.h”

npm安装失败-错误消息:enoent ENOENT:没有这样的文件或目录

安装python包compound-split时没有这样的文件或目录错误

npm安装错误:“ ENOENT:没有这样的文件或目录”

我在全局安装 Composer 时收到错误“没有这样的文件或目录”