Question about NLopt

Hi All,
(A friend asks):

I have a task that I think the MixedModels package may be better able to handle than lme4 in R.

I did a clean Julia install before proceeding to install MixedModels. Unfortunately the current version of NLopt seems broken.

julia> using NLopt
INFO: Precompiling module NLopt.
ERROR: LoadError: NLopt not properly installed. Please run Pkg.build("NLopt")

Pkg.build("NLopt") returns

====================================[ ERROR: NLopt ]=====================================

LoadError: SystemError: unable to read directory /Users/johnm1/.julia/v0.5/Homebrew/deps/usr/Library/Taps/staticfloat/homebrew-juliatranslated: No such file or directory
while loading /Users/johnm1/.julia/v0.5/NLopt/deps/build.jl, in expression starting on line 54

=========================================================================================

The web page http://pkg.julialang.org/detail/NLopt.html says:

Julia v0.5

2016-12-09 to 2017-02-07, v0.3.3, Tests fail.
2016-08-27 to 2016-12-06, v0.3.3, Tests pass.
2016-05-24 to 2016-08-26, v0.3.2, Tests pass.
. . .

I did try using Pkg.pin(“NLopt”,v"0.3.2") to downgrade to an earlier version, but still NLopt would not load.

Can you kindly provide guidance on where to go next.

Kind Regards,
Arindam Basu

It looks like you should open an issue at Homebrew.jl.

You can try removing and then re-adding Homebrew:

Pkg.rm("Homebrew")
Pkg.add("Homebrew")
Pkg.build("NLopt")

Thanks a million, will give it a shot today.

Best,
Arin

The query that Arin passed on was from me. After running the first two
commands, Pkg.build("NLopt") generated the same errors as before.
Why would the issue arise for NLopt, but not for other packages required
by MixedModels, if it was a Homebrew issue? Thus, Rmath builds without
problem?

Sorry if I use R-terminology in this thread, I’m new to Julia. I am using MixedModels for the same reason as Arin. I am having similar issues with installing “NLopt”. After an initial warning “Warning: staticfloat/juliatranslated/nlopt-2.4.2_2 already installed, it’s just not linked.” I’ve been getting following errors: “while loading /Users/adpandey/.julia/v0.5/NLopt/deps/build.jl, in expression starting on line 54”.

The exact issue seems to be the following:
Formulae found in multiple taps:

  • homebrew/science/nlopt
  • staticfloat/juliatranslated/nlopt

Clearly it can find nlopt at multiple locations and is not sure where to use it from.
Any help will be highly appreciated.

Found a solution: https://github.com/Homebrew/homebrew-science

brew tap homebrew/science
brew install nlopt

Rebuild NLopt in julia

1 Like