# Question about NLopt

**URL:** https://discourse.julialang.org/t/question-about-nlopt/2013
**Category:** General Usage
**Tags:** question, package
**Created:** [February 9, 2017, 11:53pm UTC](https://discourse.julialang.org/t/question-about-nlopt/2013 "2017-02-09T23:53:58Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![arinbasu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arinbasu/32/581_2.png) [@arinbasu](https://discourse.julialang.org/u/arinbasu)
#### Post date: [February 9, 2017, 11:53pm UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/1 "2017-02-09T23:53:58Z")

</div>

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
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

---

<div class="post-metadata">

### Author: ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)
#### Post date: [February 10, 2017, 9:18am UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/2 "2017-02-10T09:18:52Z")

</div>

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

---

<div class="post-metadata">

### Author: ![malmaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/malmaud/32/29_2.png) [@malmaud](https://discourse.julialang.org/u/malmaud)
#### Post date: [February 10, 2017, 3:14pm UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/3 "2017-02-10T15:14:25Z")

</div>

You can try removing and then re-adding Homebrew:

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

```

---

<div class="post-metadata">

### Author: ![arinbasu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arinbasu/32/581_2.png) [@arinbasu](https://discourse.julialang.org/u/arinbasu)
#### Post date: [February 10, 2017, 7:42pm UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/4 "2017-02-10T19:42:38Z")

</div>

Thanks a million, will give it a shot today.

Best,  
Arin

---

<div class="post-metadata">

### Author: ![jhmaindonald](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@jhmaindonald](https://discourse.julialang.org/u/jhmaindonald)
#### Post date: [February 10, 2017, 10:25pm UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/5 "2017-02-10T22:25:44Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![addhyan](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@addhyan](https://discourse.julialang.org/u/addhyan)
#### Post date: [March 7, 2017, 5:20pm UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/6 "2017-03-07T17:20:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![addhyan](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@addhyan](https://discourse.julialang.org/u/addhyan)
#### Post date: [March 8, 2017, 3:52am UTC](https://discourse.julialang.org/t/question-about-nlopt/2013/7 "2017-03-08T03:52:31Z")

</div>

Found a solution: [https://github.com/Homebrew/homebrew-science](https://github.com/Homebrew/homebrew-science)

brew tap homebrew/science  
brew install nlopt

Rebuild NLopt in julia
