loading "meta" package and installing "nloptr" error messages

Error: package or namespace load failed for ‘meta’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘nloptr’

when I install nloptr, this is what I get:

  • installing source package 'nloptr' ...
    ** package 'nloptr' successfully unpacked and MD5 sums checked
    ** using staged installation


    WARNING: this package has a configure script
    It probably needs manual configuration


** libs

*** arch - i386
/mingw32/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c dummy.cpp -o dummy.o
/mingw32/bin/gcc -I"C:/PROGRA~1/R/R-41~1.2/include" -DNDEBUG -I"/i386/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c init_nloptr.c -o init_nloptr.o
init_nloptr.c:35:10: fatal error: nlopt.h: No such file or directory
#include "nlopt.h"
^~~~~~~~~
compilation terminated.
make: *** [C:/PROGRA~1/R/R-41~1.2/etc/i386/Makeconf:238: init_nloptr.o] Error 1
ERROR: compilation failed for package 'nloptr'

  • removing 'C:/Users/ahaslam/Documents/R/win-library/4.1/nloptr'
    Warning in install.packages :
    installation of package ‘nloptr’ had non-zero exit status

Description of issue -

I have reinstalled R - both older and newer versions. I tried to install the nloptr package, but i then get another error message that says the nloptr package needs a manual installation. I'm not a computer programmer, so I need the instructions really basic! (I had this installed with no troubles on another older computer with an older version of R - 3.6.1.)

System Information:

  • RStudio Edition: Desktop
  • RStudio Version: 1.4.1106
  • OS Version: Windows 10
  • R Version: 4.1.2

Also:

  • RStudio diagnostics report:
  • Your sessionInfo():
  • RStudio crash report:
  • RStudio application log files:

From Troubleshooting Guide: Using RStudio

The nloptr package requires the NLopt library to be installed in your system (not in R)

SystemRequirements: A system installation of NLopt >= 2.4.0 (with headers) will be used if available.

Instructions and binaries to install NLoptin Windows can be found on the GitHub repository

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.